ci: add Slack notification workflow for teammate PRs to main#1460
Draft
esabou-snyk wants to merge 1 commit into
Draft
ci: add Slack notification workflow for teammate PRs to main#1460esabou-snyk wants to merge 1 commit into
esabou-snyk wants to merge 1 commit into
Conversation
Fires on pull_request opened/ready_for_review targeting main, skips drafts, and posts a Slack message to the channel behind the SLACK_WEBHOOK_URL secret. Author is filtered against the TEAMMATE_HANDLES repo variable (JSON array of GitHub usernames), so the list is editable in the GitHub UI without a PR. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
.github/workflows/notify-slack-pr-review.yml, which posts a Slack message when a teammate opens (or marks ready for review) a non-draft PR targetingmain.pull_requestwithtypes: [opened, ready_for_review],branches: [main].TEAMMATE_HANDLESrepo variable (JSON array of GitHub usernames).slackapi/slack-github-action@v1.27.0using an incoming webhook (SLACK_WEBHOOK_URLsecret).:memo:marker.Setup required before merge
This PR is a draft because the workflow references config that must be added in the repo Settings UI first — otherwise every PR run would fail on
fromJSON(vars.TEAMMATE_HANDLES):SLACK_WEBHOOK_URL— incoming webhook URL pointing at#team-docs.TEAMMATE_HANDLES— JSON array of teammate GitHub handles, e.g.["alice","bob","charlie"].Once both are set and this PR is marked ready, the guard clauses will start matching real events.
Test plan
SLACK_WEBHOOK_URLsecret andTEAMMATE_HANDLESvariable in repo Settings.main→ confirm one Slack message lands in#team-docswith correct title, link, and author.TEAMMATE_HANDLES→ workflow runs butnotifyjob is skipped (visible in the Actions tab).mainbase → workflow does not trigger.🤖 Generated with Claude Code