Repository navigation
[Fix] Review-state label on fork PRs does not update after a new review - #2134
zoomote[bot] wants to merge 2 commits into
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Review statusThis PR was opened by an automated account. A human maintainer must verify the change intent, provenance, and validation before merging. Current step: Required CI passed. Waiting for automated review of the latest commit. If automated review does not start, a maintainer must restart it. Review-state labels are managed by this workflow; do not edit them manually. |
Related GitHub Issue
Closes: #2133
Description
The fork review follow-up workflow never dispatched a reconciliation run, so a review on a fork PR did not update the review-state label until another event reconciled the PR.
GitHub reports the base repository as
workflow_run.head_repositoryon everypull_request_reviewrun, even for fork PRs. Two defects followed:fork === falseearly return matched every review run, so the follow-up skipped all of them. This change removes the guard. A dispatch for a same-repo PR is idempotent, and the event check still stops the chain after one hop.head=<head_repository.owner>:<head_branch>, which is the base owner on review runs. It returned zero PRs. This change lists open PRs and matcheshead.sha,head.ref, and the base repository instead.The
resolvejob oflabel-pr-review-state.ymlkeeps its owner-and-branch query. Itsworkflow_runtriggers are CI runs frompull_requestevents, wherehead_repositoryis the real fork (verified on run 39534658962 and the CI runs of PR #1662). The comment there now records this difference, because the old note told both copies to stay identical.Reviewers should check the fallback filter with care: it matches on exact head SHA and branch, so it can only resolve the PR that the review run targeted.
Test Procedure
pnpm run test:workflowpasses 305 tests in 4 files, including the rewritten follow-up suite.fork-review-followup-workflow.test.tsnow builds itsworkflow_runpayload from a real run (39534658962, the review run for PR fix(openai): count compatible cache reads #1662):head_repositoryis the base repository withfork: false, andpull_requestsis empty for the fork PR.fork: false.pnpm testfrom the repository root passes (13/13 turbo tasks).CHANGES_REQUESTEDreview on a fork PR should flip the label toawaiting-authorwithin one workflow cycle.Pre-Submission Checklist
Visual Snapshots
N/A — no UI changes.
Videos (interaction / animation only)
N/A.
Documentation Updates
Additional Notes
Get in Touch
0x7777777_