feat: add reusable PR Slack notification workflow#3
Conversation
Reusable workflow that posts new PRs to a Slack channel, tagging a configurable user group. Any e2b-dev repo can call it with a 10-line workflow file and its own SLACK_CHANNEL_ID / SLACK_REVIEW_GROUP vars. Includes: - Slack mrkdwn injection prevention (escaped PR titles) - Pinned dependencies (package-lock.json + npm ci) - Draft PR skip Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PR SummaryMedium Risk Overview Includes a small Node-based action ( Reviewed by Cursor Bugbot for commit 30f4a6e. Bugbot is set up for automated code reviews on this repo. Configure here. |
Move the PR Slack notification script and logic to the org-level e2b-dev/.github repo (PR e2b-dev/.github#3). This repo now has a thin 18-line caller workflow. Any e2b-dev repo can reuse the same workflow with its own SLACK_REVIEW_GROUP variable. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The script had a manual trigger path (PR_URL/PR_NUMBER env vars) that was never reachable from the reusable workflow. Simplified to only read from the event payload. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Shows which repo the PR is from (e.g. e2b-dev/infra#123) so the channel is useful once multiple repos use this workflow. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add PR_NUMBER/PR_TITLE/PR_URL/PR_AUTHOR optional inputs to the reusable workflow so callers can add workflow_dispatch for testing - Escape pipe (|) character in PR titles — it breaks Slack's link syntax (<url|label>) when used literally inside angle brackets - Extract escaping into escapeSlackLabel() function Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 817b6ca. Configure here.
Slack only decodes & < > — | renders literally. Pipe in the label portion of <url|label> doesn't break the link since Slack splits on the first | only. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Summary
@pr-infra,@pr-belt)Usage in a repo
Repo variables needed:
SLACK_CHANNEL_ID— the#code-review-requestschannel IDSLACK_REVIEW_GROUP— Slack user group ID (e.g. for@pr-infra)Test plan
workflow_dispatchor open a test PR#code-review-requests🤖 Generated with Claude Code