mirror of
https://github.com/ReCloudStudio/WebHooker.git
synced 2026-09-23 00:21:28 +00:00
feat: link commit in check suite messages
Add clickable commit links in check_suite formatter output with fallback URL when html_url is unavailable. Remove check_run from checks template since formatter only handles check_suite events.
This commit is contained in:
parent
5deff66b8d
commit
55eafaeecc
3 changed files with 14 additions and 4 deletions
|
|
@ -164,10 +164,13 @@ describe("message title spec", () => {
|
|||
event("check_suite", { check_suite: suite, repository: repo, sender }),
|
||||
);
|
||||
expect(msg.title).toBe("acme/widget: Check suite success");
|
||||
expect(msg.url).toBe("https://github.com/acme/widget/runs/2");
|
||||
expect(msg.fields![0].value).toBe("✅ success");
|
||||
expect(msg.fields![1].value).toBe("Cloudflare Pages");
|
||||
expect(msg.fields![2].value).toBe("main");
|
||||
expect(msg.fields![3].value).toBe("abc123d");
|
||||
expect(msg.fields![3].value).toBe(
|
||||
"[abc123d](https://github.com/acme/widget/commit/abc123def456)",
|
||||
);
|
||||
});
|
||||
|
||||
it("workflow_job shows job status, workflow, branch and commit", () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue