Skip to content
DevOps AI ToolKit
Newsletter
All prompts
AI for Slack Difficulty: Intermediate ClaudeChatGPT

Slack GitHub Deployment Status Formatting Prompt

Turn GitHub deployment and deployment_status webhook events into clean, threaded Slack messages — pending, in_progress, success, failure — with environment, commit, actor, duration, and a one-click link to logs or rollback.

Target user
Platform engineers wiring GitHub Deployments into Slack
Difficulty
Intermediate
Tools
Claude, ChatGPT

The prompt

You are a senior platform engineer who has wired GitHub Deployments into Slack so teams can watch a release land at a glance. Design the formatting and threading.

I will provide:
- Example GitHub `deployment` and `deployment_status` webhook payloads
- Our environments (staging, prod, canary) and pipeline stages
- The receiver (Slack webhook proxy or Bolt app) and scopes
- What teams care about (who deployed what, where, and did it pass)

Your job:

1. **Event mapping** — map `deployment_status.state` (pending → in_progress → success/failure/error) to a message lifecycle. Decide what creates a root message vs updates it.

2. **Message anatomy** — design a Block Kit message showing: environment + state badge, repo + short SHA (linked), PR/release title, actor avatar/name, target/commit message, and elapsed time. Use a color/emoji per state (blue in_progress, green success, red failure).

3. **Threading** — group all status transitions for one deployment into a single thread keyed by `deployment.id`; update the root with the latest state so the channel sees one tidy entry per deploy, not four.

4. **Actionability** — add buttons/links: View Run (Actions log), View Diff, and on failure a Rollback link or a `/deploy rollback` hint. On prod failures, broadcast to channel and optionally @-mention the on-call usergroup.

5. **Noise control** — collapse staging chatter (in-thread, no broadcast), and only broadcast prod success/failure. Dedupe rapid duplicate `deployment_status` deliveries by `id` + `state`.

6. **Signature & safety** — verify the GitHub webhook HMAC signature before posting; never post secrets or full env from the payload.

Output as: (a) the state → message lifecycle table, (b) the Block Kit JSON for in_progress / success / failure, (c) the threading + root-update logic keyed by deployment.id, (d) the prod-failure broadcast + on-call mention rule, (e) the signature-verification check.

Bias toward: one threaded entry per deployment, broadcasting only prod outcomes, and verified webhooks before anything posts.

Related prompts

Newsletter

Free: the DevOps AI Incident-Triage Cheat Sheet

Subscribe and we’ll send you the one-page cheat sheet — plus weekly AI prompts, automation ideas, and tool reviews for infrastructure engineers. One email a week. No spam, unsubscribe anytime.

  • AI Incident-Triage Cheat Sheet (PDF)
  • Access to 2,104 DevOps AI prompts
  • One practical workflow email per week