[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. 馃珫 Status page with uptime monitoring & API monitoring as code 馃珫 openstatus.dev
bun drizzle-orm monitoring monitoring-as-code nextjs observability on-call open-source shadcn-ui status-page statuspage synthetic-monitoring tinybird turso uptime uptime-checker uptime-monitor

feat(subscriptions): detect Microsoft Teams webhook URLs and emit Adaptive Cards (#2898) master

* feat(subscriptions): detect Microsoft Teams webhook URLs and emit Adaptive Cards Status-page webhook subscribers receive channel-native payloads for Slack and Discord URLs; any other URL - including Teams Workflows and the legacy Office connector - gets the generic JSON body, which Teams cannot render as a card (issue #1156). This adds a `teams` flavor: - `detectWebhookFlavor` recognizes hostnames ending in `.logic.azure.com`, `.powerplatform.com`, or `.webhook.office.com` (parsed, not substring, so a path like `?to=webhook.office.com` stays generic). - `buildTeamsPayload` emits an Adaptive Card 1.5 inside the `application/vnd.microsoft.card.adaptive` message envelope, mirroring the ms-teams monitor-alert provider's wire format. The card has a status-colored header container (attention/warning/good/accent), a FactSet with status/page /timestamp, the update message, affected components, manage/unsubscribe links, and a "View details" action. - `buildTestPayload('teams')` emits the matching test card. - Dashboard: `FLAVOR_LABELS` gets a "Microsoft Teams" entry so the subscribers table shows the right badge; the subscriber form's helper text now names Teams alongside Slack and Discord. - Docs: a Microsoft Teams section lives between Discord and Generic in the subscriber reference. Tests mirror the Slack/Discord coverage: four flavor-detection cases (plus a negative substring case and a malformed-URL fallback), three send-notification cases (envelope shape, manage/unsubscribe links, maintenance deep link), and one `buildTestPayload` case. All 54 webhook test steps pass under `deno test --no-check`. Closes part of #1156. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * docs(subscriber): list Microsoft Teams in the webhook channel bullet; trim detection comment Address the Claude Code Review on #2898: - The "Adding subscribers from the dashboard" section still said webhook URLs go to Slack and Discord only; it now names Microsoft Teams alongside them, matching the dashboard form helper text and the dedicated section below. - Shorten the TEAMS_HOST_SUFFIXES comment to one line explaining why we match by hostname suffix. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * ci: apply automated fixes --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>


+303 -5
5 changed files