You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pr-queue/head-check: edited PR reviews count as unedited (gh pr view never fetches includesCreatedEdit for reviews) #56
fork-ci/actions/pr-queue (and so head-check, which imports its rules) reads PR comments and reviews with gh pr view --json comments,reviews (pr_queue.pyVIEW). For comments gh's GraphQL query asks for includesCreatedEdit and isMinimized. For reviews it does not: the query is reviews(first: 100) {nodes {id,author{login},authorAssociation,submittedAt,body,state,commit{oid},reactionGroups{...}}}, yet the JSON still has "includesCreatedEdit": false (the unfetched Go default). Checked with gh 2.102.0 and GH_DEBUG=api.
So lens.py (includesCreatedEdit is not False = edited) treats every review as never edited. A lens posted as a PR review and later edited (for example its read at: changed from the sha read to a newer one) counts as a valid read of a head nobody read, for head-check, the queue's re-arm, and anything else using Review.
Found by CodeRabbit on a project PR that mirrors these rules. Fix: fetch reviews' includesCreatedEdit explicitly (GraphQL, by PR, paginated), never trust gh pr view's review flag; a review whose flag was not fetched counts as edited (fail closed). Test: a review fixture with includesCreatedEdit: false from the gh pr view shape must not count unless the explicit fetch says false. New ci/vN after the fix.
Activity
fork-ci: read reviews' edit and hidden flags with our own query (#56) (…
fork-ci: read reviews' edit and hidden flags with our own query (#56) (…
fork-ci: read reviews' edit and hidden flags with our own query (#56) (…
fork-ci: read reviews' edit and hidden flags with our own query (#56) (…
fork-ci: read reviews' edit and hidden flags with our own query (#56) (…