Skip to content

Notify #documentation reviewers when autogen-docs PRs are ready#978

Draft
claude[bot] wants to merge 2 commits into
mainfrom
add-autogen-docs-slack-notify
Draft

Notify #documentation reviewers when autogen-docs PRs are ready#978
claude[bot] wants to merge 2 commits into
mainfrom
add-autogen-docs-slack-notify

Conversation

@claude

@claude claude Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Requested by Daniel Barr · Slack thread

Before / After

Before: When an autogen-docs PR (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-docs PR 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

  • Trigger: pull_request with types: [ready_for_review]. The existing Upstream Release Docs workflow flips these PRs draft -> ready via gh pr ready at the end of its run, which emits exactly this event.
  • Label guard: the job only runs when the PR carries the autogen-docs label (applied by Renovate) and is authored by renovate[bot], so human PRs and other bots' PRs are ignored.
  • claude-code-action (prompt/automation mode): a single anthropics/claude-code-action step (same pinned SHA, claude-opus-4-7, allowed_bots: 'renovate') runs a prompt that uses gh pr view to 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 @handle when there's no match), and composes one message.
  • Slack delivery: the message is posted with curl to the Slack Web API chat.postMessage. The step checks the response ok field and fails (non-zero exit) if Slack returns an error.

Before this can run

  • New secret SLACK_BOT_TOKEN (a Slack bot token, xoxb-...) must be added to the repo. Required scopes:
    • chat:write — post the message
    • users:read — list users to map GitHub handle -> Slack id
    • users.profile:read — read the custom "GitHub" profile field
    • users:read.email — only if email-based matching is used as a fallback
  • Slack profile GitHub handles: reviewer @-tagging depends on each reviewer's GitHub handle being present in their Slack profile (the Okta-pushed "GitHub" custom field). When a handle can't be matched, the message falls back to the plain GitHub @handle as text rather than guessing a Slack id.
  • Channel membership: the Slack bot must be invited to the #documentation channel (id C06SZA9HBHU, set directly as an env var since channel ids are not secret), or chat.postMessage fails with not_in_channel.

🤖 Generated with Claude Code

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.
@vercel

vercel Bot commented Jun 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs-website Ready Ready Preview, Comment Jun 25, 2026 9:31pm

Request Review

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