feat: AI-generated deploy Slack notifications - #101
Conversation
Adds a reusable workflow that posts a Claude-written digest to subscribed Slack channels when a Deploy PR (merged into the release branch) ships. Channels subscribe to repos via a central deploy-notifications.yml config in duchamp. Assisted-by: Claude:Fable-5 [claude-code] Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| for (const channel of subscription.channels) { | ||
| await postToSlack(channel, digest, slackToken) | ||
| } |
There was a problem hiding this comment.
🟡 One failing channel aborts the rest. postToSlack throws when data.ok is false (line 265), so if the first channel fails, this loop stops and no later channel gets the digest — and the whole job fails. The deploy-notifications.yml docs explicitly warn the bot must be invited to each channel (/invite @<bot-name>), so a not-invited channel is a realistic failure that would silently block notifications to correctly-configured channels.
Consider catching per channel so one bad subscription doesn't take down the others:
| for (const channel of subscription.channels) { | |
| await postToSlack(channel, digest, slackToken) | |
| } | |
| let anyFailed = false | |
| for (const channel of subscription.channels) { | |
| try { | |
| await postToSlack(channel, digest, slackToken) | |
| } catch (error) { | |
| anyFailed = true | |
| console.error(`Failed to post to ${channel}: ${error}`) | |
| } | |
| } | |
| if (anyFailed) { | |
| process.exitCode = 1 | |
| } |
Code ReviewSummaryAdds an AI-generated deploy Slack notification system: a reusable GitHub Actions workflow ( Nicely scoped PR — it reuses the established Issues Found🟡 Important
🟢 Suggestions
Areas Reviewed
Questions for Author
|
|
Detected new or modified files in |
chr-tatu
left a comment
There was a problem hiding this comment.
I left a non-blocking questions. Let's test it out and we can polish it later!
| type: string | ||
| model: | ||
| description: "Claude model used to write the digest" | ||
| default: "claude-opus-4-8" |
There was a problem hiding this comment.
Do we need opus for this? Or would sonnet be able to do the work, too?
Resolves “New changes just went live! 🥳” Deploy Slack notifications
Description
Adds deploy Slack notifications: when a Deploy PR (merged into the release branch) ships in a subscribed repo, a GitHub Action collects the shipped PRs, asks Claude to write a plain-language digest, and posts it to the subscribed Slack channels — new features in the top-level message, fixes and maintenance in a thread reply. Channels subscribe to repos via a central
deploy-notifications.ymlconfig in duchamp.Example Slack Notification
Changes
deploy-notifications.yml— central subscription config (repo → Slack channels + optional context hints for Claude), seeded withartsy/volt→#product-amber.github/workflows/deploy-notification.yml— reusable workflow, runs only for merged PRs into the release branch (defaultrelease)scripts/deploy-notification.ts— collects shipped PRs via the GitHub API, generates the digest via the Claude API, posts via Slackchat.postMessage(no new dependencies)templates/run-deploy-notification.yml— copy-paste caller workflow for consumer reposscripts/test-deploy-notification.ts— local dry-run that prints the Claude prompt for a real deploy PR, no API keys needed (usesghauth)docs/deploy-notifications.md— setup docs incl. remaining org setup (Slack app withchat:write,SLACK_BOT_TOKENorg secret)Test Plan
yarn jest scripts/deploy-notification.test.ts— 9 tests passnpx ts-node scripts/test-deploy-notification.ts artsy/volt 11796— verified against a real Volt deploy PR: shipped PRs detected, prompt rendered with repo contextAssisted-by: Claude:Fable-5 [claude-code]
🤖 Generated with Claude Code