mirror of
https://github.com/ReCloudStudio/WebHooker.git
synced 2026-09-22 16:11:29 +00:00
fix: link only the repo head in message titles, keep the subject plain
This commit is contained in:
parent
84d8a5384d
commit
dfb65ef70d
7 changed files with 75 additions and 15 deletions
|
|
@ -236,9 +236,9 @@ describe("processWebhook", () => {
|
|||
const parsed = JSON.parse(sent[0]!.body) as {
|
||||
embeds?: Array<{ title?: string; color?: number; description?: string }>;
|
||||
};
|
||||
expect(parsed.embeds?.[0]?.title).toBe("acme/widget: Deploy failed");
|
||||
expect(parsed.embeds?.[0]?.title).toBe("acme/widget");
|
||||
expect(parsed.embeds?.[0]?.color).toBe(0xf85149);
|
||||
expect(parsed.embeds?.[0]?.description).toBe("prod down");
|
||||
expect(parsed.embeds?.[0]?.description).toBe("Deploy failed\nprod down");
|
||||
});
|
||||
|
||||
it("rejects custom webhooks without a signature header", async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue