mirror of
https://github.com/Elysola/WebHooker.git
synced 2026-11-20 17:13:49 +00:00
fix(push): link branch ref in title as inline code
This commit is contained in:
3 files changed
+5
-3
No files matched your search
@@ -116,7 +116,7 @@ export function formatPush(
|
||||
count,
|
||||
s: count !== 1 ? "s" : "",
|
||||
repo: repo ?? t("common.repository"),
|
||||
ref,
|
||||
ref: isTagPush ? tagLink(baseUrl, rawRef, ref) : branchLink(baseUrl, rawRef, ref),
|
||||
}),
|
||||
url: compareUrl,
|
||||
color: GITHUB_COLORS.push,
|
||||
|
||||
@@ -18,7 +18,7 @@ exports[`formatter snapshots push 1`] = `
|
||||
],
|
||||
"footer": "acme/widget",
|
||||
"timestamp": "TIMESTAMP",
|
||||
"title": "acme/widget: Pushed 1 commit to main",
|
||||
"title": "acme/widget: Pushed 1 commit to [\`main\`](https://github.com/acme/widget/tree/main)",
|
||||
"url": "https://github.com/acme/widget/compare/aaa...bbb",
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -32,7 +32,9 @@ describe("message title spec", () => {
|
||||
sender,
|
||||
}),
|
||||
);
|
||||
expect(msg.title).toBe("acme/widget: Pushed 1 commit to main");
|
||||
expect(msg.title).toBe(
|
||||
"acme/widget: Pushed 1 commit to [`main`](https://github.com/acme/widget/tree/main)",
|
||||
);
|
||||
expect(msg.description).toBe(
|
||||
"[`abcd123`](https://github.com/acme/widget/commit/abcd1234ef) fix stuff",
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user