Skip to content

review-prs: submit a blocking verdict as REQUEST_CHANGES - #169

Merged
bbondy merged 1 commit into
masterfrom
request-changes-for-blocking-review
Oct 6, 2026
Merged

bbondy merged 1 commit into
masterfrom
request-changes-for-blocking-review

Conversation

@netzenbot

Copy link
Copy Markdown
Collaborator

Problem

A review headed "Recommendation: request changes" was submitted as a COMMENT review. GitHub defines that as informational, so the PR shows no requested changes and nothing blocks the merge. A reviewer pointed this out on a bravebot PR.

Change

For a project whose profile sets review.verdict, post-review.py now picks the review event:

Review contents Event Heading
An earlier comment still open, or any finding above nit severity REQUEST_CHANGES Recommendation: request changes
Only nits (low) COMMENT Recommendation: comments only
Clean APPROVE (unchanged) Recommendation: approve

A PR the bot opened itself always gets COMMENT: GitHub rejects a request for changes from the PR's author. A profile without verdict is unchanged.

The bot's later APPROVE replaces its earlier REQUEST_CHANGES, and check-can-approve.py only counts COMMENTED bodies, so a prior request for changes does not block a later approval.

Resolving a thread once the fix is verified, and saying why one stays open, was already added in #167.

Test plan

  • tests/test_review_prs.py: new cases for blocking, medium, nits-only, the bot's own PR, and a profile with no verdict. pytest tests/test_review_prs.py passes (116).
  • make check was not run.

A review headed "request changes" was posted as a COMMENT review, which GitHub
treats as informational and which does not block a merge. With a verdict profile,
a review with an earlier comment still open or a finding above nit severity now
uses REQUEST_CHANGES. A review with only nits stays COMMENT and says so. A PR the
bot opened keeps COMMENT, since GitHub rejects a request for changes from its author.
@bbondy
bbondy merged commit 1a2e2de into master Oct 6, 2026
3 checks passed
@bbondy
bbondy deleted the request-changes-for-blocking-review branch October 6, 2026 12:35
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.

2 participants