Skip to content

feat: add reusable-slack-pr-review-notification workflow - #1

Merged
aidandaly24 merged 2 commits into
mainfrom
feat/slack-pr-review-notification
Aug 7, 2026
Merged

feat: add reusable-slack-pr-review-notification workflow#1
aidandaly24 merged 2 commits into
mainfrom
feat/slack-pr-review-notification

Conversation

@jariy17

@jariy17 jariy17 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Adds a reusable workflow that posts GitHub PR review activity to Slack with real @-mentions, mirroring the existing reusable-slack-issue-notification pattern (webhook -> Slack Workflow Builder, branch on event_type).

Behaviors (inherited from the caller on: block)

event pings
pull_request: review_requested the requested reviewer
pull_request_review: submitted the PR author (approved / changes_requested / commented)
pull_request: synchronize everyone who already reviewed or commented (minus author)

Mentions

Resolved from a github-login -> Slack member ID JSON secret SLACK_PR_REVIEW_USER_MAP; unmapped logins fall back to plain @login (visible, no ping). Verified live: a mention to a non-author renders blue and notifies.

Secrets (fetched via fetch-secrets, both in DevX Secrets Manager 631957124172)

  • shared/SLACK_PR_REVIEW_WEBHOOK_URL — the "PR Summary" Slack workflow webhook
  • shared/SLACK_PR_REVIEW_USER_MAP — login -> Slack ID JSON

Injection guard

pr_title passed via env: + toJSON, matching reusable-slack-issue-notification.

Rollout

Callers (one per repo, slack-pr-review-notification.yml) pin this reusable @<merge-SHA> — added after this merges.

Posts GitHub PR review activity to a Slack Workflow Builder webhook with
@-mentions resolved from the SLACK_PR_REVIEW_USER_MAP secret.

Three behaviors, inherited from the caller's on: block:
- review_requested  -> ping the requested reviewer
- review submitted  -> ping the PR author (approved/changes_requested/commented)
- synchronize       -> ping everyone who already reviewed or commented

Requires inherited secrets SLACK_PR_REVIEW_WEBHOOK_URL and
SLACK_PR_REVIEW_USER_MAP, fetched via fetch-secrets. Mirrors the
reusable-slack-issue-notification pattern.
@jariy17
jariy17 requested a review from a team August 7, 2026 01:38
…ired slots

- mentions now emit raw Slack IDs for Person-type Slack vars (real pinging pills)
- triggers 1-4 use main_mention; branch_updated uses mention_1..5 (cap 5, warn on overflow)
- Slack Person vars are required + reject empty, so unused slots are padded with a
  filler ID that Slack dedupes into an invisible pill
- add requested_reviewers to the branch_updated union; drop pr_author
@aidandaly24
aidandaly24 merged commit 626595f into main Aug 7, 2026
2 checks passed
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.

2 participants