Skip to content

fix: replace on-call reviewer assignment with Slack notification + last-reviewer#307

Merged
dannyneira merged 7 commits into
mainfrom
fix/release-docs-slack-reviewer-assignment
Jul 9, 2026
Merged

fix: replace on-call reviewer assignment with Slack notification + last-reviewer#307
dannyneira merged 7 commits into
mainfrom
fix/release-docs-slack-reviewer-assignment

Conversation

@dannyneira

@dannyneira dannyneira commented Jul 8, 2026

Copy link
Copy Markdown
Member

Summary

Replaces the fragile Grafana-based on-call reviewer assignment with two simpler, more reliable mechanisms:

  1. Slack notification — the Oz agent posts to #oncall-client (C06MT1NRBFV) mentioning @oncall-client-primary and @oncall-client-secondary after creating the PR. Grafana keeps those Slack user groups in sync with the rotation automatically — no Grafana API calls needed.
  2. Last-reviewer assignment — GitHub Actions finds the last human reviewer from recently merged docs PRs and assigns them to the new PR. Falls back to dannyneira if none found.

The PR is created with auto-merge enabled, so once the assigned reviewer approves it merges automatically.

Changes

.github/workflows/release-docs-update.yml

  • Removed assign_oncall_reviewers workflow input and all related env vars/normalization
  • Removed reviewer prompt injection from the "Write Oz prompt" step
  • Added Slack posting instruction to the agent prompt: resolves both oncall-client-primary and oncall-client-secondary group IDs via usergroups.list, posts to #oncall-client
  • Replaced "Assign on-call reviewers from PR body" step with "Assign last docs PR reviewer" — queries pulls/{n}/reviews on recent merged PRs to find the last human reviewer

.agents/skills/release_updates/SKILL.md

  • Replaced "Required for on-call reviewer assignment" section with "Required for Slack PR notification" (DOCS_SLACK_BOT_TOKEN only — channel ID is hardcoded)
  • Updated inline Python snippet to resolve and mention both @oncall-client-primary and @oncall-client-secondary
  • Added note that reviewer assignment is handled by GitHub Actions

.agents/skills/release_updates/scripts/resolve_oncall_reviewers.py

  • Deleted — no longer used

Slack message format

:books: New release docs PR ready for review
https://github.com/warpdotdev/docs/pull/NNN
@oncall-client-primary @oncall-client-secondary please take a look when you get a chance.

Oz environment changes required

Add to the docs Oz environment (K5KStCm5aYvhfBJb8cHol6) at https://oz.warp.dev/agents/019eb332-2ee0-7417-8ecc-89260cf5b850:

  • DOCS_SLACK_BOT_TOKEN — Slack bot token for posting to #oncall-client

Remove from the docs Oz environment (no longer needed):

  • DOCS_AGENT_GRAFANA_TOKEN
  • ONCALL_EMAIL_TO_GITHUB_OVERRIDES

Also ensure the bot is a member of #oncall-client (/invite @botname in that channel).

Co-Authored-By: Oz oz-agent@warp.dev

…st-reviewer

- Remove Grafana-based on-call resolver entirely from workflow and skill
- Oz agent now posts to #growth-docs Slack mentioning @oncall-client-primary
  after creating the PR (uses SLACK_BOT_TOKEN + GROWTH_DOCS_SLACK_CHANNEL_ID)
- GitHub Actions now finds the last human reviewer from recent merged docs PRs
  and assigns them to the new PR (reliable fallback to dannyneira)
- Remove assign_oncall_reviewers workflow input and all related env vars

Requires: add SLACK_BOT_TOKEN and GROWTH_DOCS_SLACK_CHANNEL_ID to the
docs Oz environment (K5KStCm5aYvhfBJb8cHol6) via the agent page.

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label Jul 8, 2026
@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jul 9, 2026 7:48pm

Request Review

oz-for-oss[bot]

This comment was marked as outdated.

Co-Authored-By: Oz <oz-agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

Reviewed the release docs workflow change that replaces Grafana on-call reviewer resolution with Slack notification instructions and a GitHub Actions last-reviewer assignment step.

Concerns

  • The new reviewer lookup likely calls the pulls endpoint with POST semantics because it passes -F fields to gh api without forcing GET, so the action can skip the intended last-reviewer assignment and fall back to the default reviewer.
  • The last-reviewer logic only inspects the newest merged PR instead of scanning recent merged PRs until it finds a human reviewer, which can incorrectly fall back when the newest merged PR has no human review.
  • The Slack notification example in the release update skill references names that are not defined/imported, so agents following it can fail before posting or while handling Slack errors.

Verdict

Found: 0 critical, 4 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread .agents/skills/release_updates/SKILL.md
Comment thread .agents/skills/release_updates/SKILL.md
Comment thread .github/workflows/release-docs-update.yml Outdated
Comment thread .github/workflows/release-docs-update.yml Outdated
@warpdotdev warpdotdev deleted a comment from oz-for-oss Bot Jul 8, 2026
…e PRs

- Add 'import sys' to SKILL.md Slack snippet
- Add pr_url comment showing how to obtain it from gh pr view
- Fix gh api pulls endpoint to use query string params instead of -F flags
  (avoids unintended POST semantics)
- Iterate over recent merged PRs until a human reviewer is found, instead
  of only checking the single most recently merged PR

Co-Authored-By: Oz <oz-agent@warp.dev>
@dannyneira dannyneira merged commit ad42522 into main Jul 9, 2026
6 of 7 checks passed
@dannyneira dannyneira deleted the fix/release-docs-slack-reviewer-assignment branch July 9, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants