Skip to content

fix(review-bot): use GitHub reviewDecision as source of truth for approval - #339

Merged
nourshoreibah merged 1 commit into
mainfrom
review-bot-source-of-truth
Aug 22, 2026
Merged

fix(review-bot): use GitHub reviewDecision as source of truth for approval#339
nourshoreibah merged 1 commit into
mainfrom
review-bot-source-of-truth

Conversation

@nourshoreibah

Copy link
Copy Markdown
Collaborator

Summary

Test plan

  • Confirm pr-review-status.yml's github.graphql call resolves reviewDecision correctly on a real PR (dry run via workflow_dispatch or a test PR)
  • Approve a test PR with only the always-reviewer (not the assigned roster reviewer) and confirm Slack header flips to "Approval Requirement Met" and the author gets DM'd
  • Confirm pr-reviewer-remind.yml cron no longer sends a reminder for a PR that's already reviewDecision: APPROVED but has a pending requested reviewer

🤖 Generated with Claude Code

…roval

pr-review-status.yml and pr-reviewer-remind.yml computed "fully approved"
from a hardcoded set of tracked participants (main/second/always reviewer),
so the Slack "approved" state and DM drifted from GitHub's own required
review policy whenever that policy changed (e.g. min reviewers 2 -> 1).
Query the PR's reviewDecision via GraphQL instead, which already folds in
required_approving_review_count, code-owner rules, and dismissals. Also
stops pr-reviewer-remind.yml from nagging a still-pending assigned
reviewer once GitHub already considers the PR approved.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@nourshoreibah nourshoreibah added the no-review The PR review bot won't run label Aug 22, 2026
@nourshoreibah
nourshoreibah marked this pull request as ready for review August 22, 2026 17:15
@nourshoreibah
nourshoreibah merged commit 5efe226 into main Aug 22, 2026
19 checks passed
@nourshoreibah
nourshoreibah deleted the review-bot-source-of-truth branch August 22, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-review The PR review bot won't run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant