Notify #documentation reviewers when autogen-docs PRs are ready#978
Draft
claude[bot] wants to merge 2 commits into
Draft
Notify #documentation reviewers when autogen-docs PRs are ready#978claude[bot] wants to merge 2 commits into
claude[bot] wants to merge 2 commits into
Conversation
When a Renovate-authored autogen-docs PR is flipped to ready-for-review, run claude-code-action to post a tailored reviewer summary into the #documentation Slack channel, tagging each requested reviewer with what to check. Reuses the marker-delimited 'At a glance' summary from the Upstream Release Docs workflow and resolves GitHub handles to Slack ids via Slack profile fields, falling back to plain @Handles.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Requested by Daniel Barr · Slack thread
Before / After
Before: When an
autogen-docsPR (the Renovate-authored upstream version-bump docs PRs) goes ready-for-review, docs reviewers rely on the limited GitHub-native Slack integration / generic PR notifications. Those are noisy, don't summarize what actually changed, and don't tell a given reviewer what they specifically need to look at.After: When an
autogen-docsPR is flipped to ready-for-review, the #documentation channel gets a single tailored summary: a one-line headline of which upstream project/version the docs update is for (linked to the PR), a 2-4 bullet recap reusing the PR's "At a glance" summary, and a Reviewers section that tags each requested reviewer with the specific thing they should check.How it works
pull_requestwithtypes: [ready_for_review]. The existing Upstream Release Docs workflow flips these PRs draft -> ready viagh pr readyat the end of its run, which emits exactly this event.autogen-docslabel (applied by Renovate) and is authored byrenovate[bot], so human PRs and other bots' PRs are ignored.anthropics/claude-code-actionstep (same pinned SHA,claude-opus-4-7,allowed_bots: 'renovate') runs a prompt that usesgh pr viewto read the PR (title, body, requested reviewers, files), reuses the marker-delimited..."At a glance" summary, resolves each requested reviewer's GitHub handle to a Slack id via the Slack profile "GitHub" field (falling back to a plain@handlewhen there's no match), and composes one message.curlto the Slack Web APIchat.postMessage. The step checks the responseokfield and fails (non-zero exit) if Slack returns an error.Before this can run
SLACK_BOT_TOKEN(a Slack bot token,xoxb-...) must be added to the repo. Required scopes:chat:write— post the messageusers:read— list users to map GitHub handle -> Slack idusers.profile:read— read the custom "GitHub" profile fieldusers:read.email— only if email-based matching is used as a fallback@handleas text rather than guessing a Slack id.C06SZA9HBHU, set directly as an env var since channel ids are not secret), orchat.postMessagefails withnot_in_channel.🤖 Generated with Claude Code