Skip to content

feat: Add Slack notifications when Deploy PRs merge - #100

Draft
olerichter00 wants to merge 2 commits into
mainfrom
olerichter00/notify-deploy-slack
Draft

feat: Add Slack notifications when Deploy PRs merge#100
olerichter00 wants to merge 2 commits into
mainfrom
olerichter00/notify-deploy-slack

Conversation

@olerichter00

@olerichter00 olerichter00 commented Jul 15, 2026

Copy link
Copy Markdown

Attempt to implement Claude Tag implementation in Duchamp as GitHub Action.

Description

Adds a reusable notify-deploy-slack GitHub Action and workflow that posts product-friendly deploy summaries to Slack when a Horizon Deploy PR (stagingrelease) merges. Messages highlight new features in the main post and group fixes and maintenance items in a thread reply.

When ANTHROPIC_API_KEY is provided, Claude (Haiku) batch-rewrites PR titles and descriptions into non-technical copy. Categorization, product areas, and Notion/Jira/flag links still come from rule-based parsing. On API failure, it falls back to heuristics — deploy notifications never block on AI.

Changes

  • notify-deploy-slack action: parse deploy PR commits, enrich PR metadata, format Slack mrkdwn, post via bot token
  • Optional Claude summarization (summarize-with-claude.ts) with rule-based fallback
  • Reusable workflow, consumer template, and repo→channel config for artsy/volt#product-amber
  • Local dry-run script (no Slack token needed; set ANTHROPIC_API_KEY to preview Claude copy)
  • Dry-run previews show copy source counts (e.g. 3 claude, 1 rules)
  • Docs and build:action:notify-deploy-slack npm script

Example Slack notification

Dry-run of volt#11796 (./scripts/run-notify-deploy-slack-local.sh --dry-run 11796):

Main message

:rocket: A new batch of Volt changes just went live (<https://github.com/artsy/volt/pull/11796|PR>)!

New Features

Artworks: *Add Public-facing Routes for Studio* — Resolves [Public-facing routes for Studio](https://app.notion.com/p/artsy/Studio-Public-facing-routes-for-Studio-381cab…) (<https://github.com/artsy/volt/pull/11786|PR>)

Check the thread for fixes and improvements :thread:

Thread reply

Improvements & Maintenance

*AWS Storage Library Update* — Routine dependency update of the aws-sdk-s3 gem, with no visible changes (<https://github.com/artsy/volt/pull/11795|PR>)
*Test Tooling Update* — Routine update of the selenium-webdriver tool used for automated browser tests (<https://github.com/artsy/volt/pull/11794|PR>)
ArtOS: *Use Pills for the Collaborators Input in the Instagram Editor* — Use Palette pills as elements to display the collaborator usernames entered by the user. (<https://github.com/artsy/volt/pull/11797|PR>)

Remaining setup (after merge)

In duchamp (this PR):

  • Add artsy/volt subscription in config/notify-deploy-slack.yml (#product-amber, project name Volt)
  • Publish reusable workflow and action on main

Slack:

  1. Create or reuse a Slack app with a bot token (xoxb-…) scoped with chat:write (incoming webhooks cannot post thread replies)
  2. Invite the bot to #product-amber (or a test channel while validating)

Anthropic (optional, for better copy):

  1. Get an API key from https://console.anthropic.com/settings/keys (or reuse Artsy's org-level ANTHROPIC_API_KEY from run-claude-review)
  2. Add as repo or org secret ANTHROPIC_API_KEY

In artsy/volt:

  1. Add repository secret SLACK_BOT_TOKEN with the bot token
  2. Optionally add ANTHROPIC_API_KEY (same key as Claude PR review)
  3. Copy templates/notify-deploy-slack.yml into .github/workflows/
  4. Merge — notifications fire on the next merged Horizon Deploy PR

Optional — test before production:

  • Local preview: ./scripts/run-notify-deploy-slack-local.sh --dry-run <deploy-pr-number>
  • With Claude: export ANTHROPIC_API_KEY=sk-ant-... before running dry-run
  • Post to test channel: pass slack-channel: "#your-test-channel" as a workflow input

Test plan

  • yarn test .github/actions/notify-deploy-slack — 45 tests pass
  • ./scripts/run-notify-deploy-slack-local.sh --dry-run 11796 — preview in tmp/, no Slack token required
  • Same dry-run with ANTHROPIC_API_KEY — preview shows Copy source: N claude, …
  • After merge: wire workflow into volt, set SLACK_BOT_TOKEN (+ optional ANTHROPIC_API_KEY)

Assisted-by: Claude:Sonnet-4.6 [claude-code]

Introduce a reusable notify-deploy-slack action and workflow that posts
product-friendly deploy summaries to Slack when staging→release PRs merge.

Co-authored-by: Cursor <cursoragent@cursor.com>
@olerichter00 olerichter00 self-assigned this Jul 15, 2026
Batch-summarize included PRs with Haiku when ANTHROPIC_API_KEY is set,
fall back to rule-based titles and descriptions on failure, and show
copy source counts in dry-run previews.

Co-authored-by: Cursor <cursoragent@cursor.com>
@olerichter00

Copy link
Copy Markdown
Author

Closing in favor of #101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant