fix(renovate-approve): use latestReviews so the guard works with the app token - #810
Open
tolzhabayev wants to merge 1 commit into
Open
fix(renovate-approve): use latestReviews so the guard works with the app token#810tolzhabayev wants to merge 1 commit into
tolzhabayev wants to merge 1 commit into
Conversation
tolzhabayev
force-pushed
the
fix/renovate-gate-review-guard
branch
from
August 31, 2026 14:47
bd0adf6 to
779dbd5
Compare
tolzhabayev
marked this pull request as ready for review
August 31, 2026 14:51
tolzhabayev
requested review from
toddtreece,
wbrowne and
xnyo
and removed request for
a team
August 31, 2026 14:51
tolzhabayev
enabled auto-merge (squash)
August 31, 2026 14:51
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.
The
Post gate decisionstep re-reads the PR's reviews before posting, so that a human requesting changes still wins. It did that withgh pr view --json reviews, and gh's GraphQL query forreviewsalso asks forreviews.nodes[].commit. That subfield needscontents: read, and the minted app token only carriespull_requests: write, so the call fails with:It only trips once the PR already has at least one review, and a review dismissed by a rebase counts. So the sweep pays for a full Claude review, gets a verdict, then dies before posting it, and repeats on the next sweep. Across the gate repos that is 272 failed runs in the last 14 days and 17 open renovate PRs stuck this way, the oldest since 4 August.
--json latestReviewsdoes not request the commit field, so the token stays as it is. It is also the better question for this guard: it returns each reviewer's current position, so aCHANGES_REQUESTEDthat the reviewer later withdrew no longer blocks the approval, and a bot approval that a rebase dismissed correctly reads as "not approved" instead of counting forever.Same change goes to every gate repo. Refs grafana/grafana-catalog-team#1052