fix(push): render created tags/branches as create events instead of 0 commits

This commit is contained in:
RhenCloud committed 2026-08-29 16:47:00 +08:00
1 parent 5c31b573d3
commit cc8bb4182f
4 files changed
+36 -2

No files matched your search

+6 -2
View File
@@ -459,7 +459,7 @@ describe("limits and localization", () => {
expect(msg.description).toBe(`${link} ${"x".repeat(MAX_COMMIT_SUBJECT)}`);
});
it("tag push created mentions the tag", () => {
it("tag push created renders as a tag creation", () => {
const msg = formatEvent(
route,
event("push", {
@@ -472,7 +472,11 @@ describe("limits and localization", () => {
sender,
}),
);
expect(msg.description).toBe("🆕 Tag created");
expect(msg.title).toBe(
"acme/widget: 🏷️ Created tag [`v1.0`](https://github.com/acme/widget/releases/tag/v1.0)",
);
expect(msg.color).toBe(4176208);
expect(msg.description).toBeUndefined();
});
it("commit_comment without a commit id omits the sha", () => {