From 10c1de7bd194a96f86203ccfeb4fdfd9d5a15cd9 Mon Sep 17 00:00:00 2001 From: Thibault Le Ouay Date: Thu, 1 Oct 2026 15:35:22 +0200 Subject: [PATCH] slack: manifest improvment (#2828) --- apps/server/slack-manifest.json | 4 ++-- apps/server/src/routes/slack/commands.test.ts | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/server/slack-manifest.json b/apps/server/slack-manifest.json index b0ebe94f..f6953e78 100644 --- a/apps/server/slack-manifest.json +++ b/apps/server/slack-manifest.json @@ -54,8 +54,8 @@ { "command": "/openstatus", "url": "https://api.openstatus.dev/slack/commands", - "description": "Run incidents and manage status page subscriptions", - "usage_hint": "incident declare | incident list | subscribe | help", + "description": "Declare incidents and subscribe channels to status pages", + "usage_hint": "[incident | subscribe | help]", "should_escape": false } ] diff --git a/apps/server/src/routes/slack/commands.test.ts b/apps/server/src/routes/slack/commands.test.ts index 4735c844..765e171a 100644 --- a/apps/server/src/routes/slack/commands.test.ts +++ b/apps/server/src/routes/slack/commands.test.ts @@ -109,6 +109,12 @@ describe("handleSlackCommand (members only)", () => { expect(json.text).toContain("/openstatus subscribe"); }); + test("no argument shows help", async () => { + const res = await post(app, "", `U_${crypto.randomUUID()}`); + const json = (await res.json()) as { text: string }; + expect(json.text).toContain("/openstatus subscribe"); + }); + test("an unlinked user gets the link card instead of running the command", async () => { slackTestState.usersInfoImpl = () => Promise.resolve({ ok: true, user: { profile: {} } }); -- 2.51.2