ci: improve PR label reconciliation with CI gating and event triggers#228
Conversation
|
2 issues outstanding. Action required. See task
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Rebased and force-pushed 430d19c09 on What changed:
Validation:
Visual proof: not applicable for this change because it only rebases the e2e/harness follow-up branch. Final CI state on |
9bf3bb5 to
430d19c
Compare
|
I see some merge conflicts here. Working on them now... |
8a98d56 to
5053feb
Compare
|
I detected merge conflicts but could not start a task to address them. |
|
This PR has merge conflicts that need to be resolved. |
2 similar comments
|
This PR has merge conflicts that need to be resolved. |
|
This PR has merge conflicts that need to be resolved. |
|
I detected merge conflicts but could not start a task to address them. |
2 similar comments
|
I detected merge conflicts but could not start a task to address them. |
|
I detected merge conflicts but could not start a task to address them. |
|
This PR has merge conflicts that need to be resolved. |
4 similar comments
|
This PR has merge conflicts that need to be resolved. |
|
This PR has merge conflicts that need to be resolved. |
|
This PR has merge conflicts that need to be resolved. |
|
This PR has merge conflicts that need to be resolved. |
|
I detected merge conflicts but could not start a task to address them. |
|
This PR has merge conflicts that need to be resolved. |
1 similar comment
|
This PR has merge conflicts that need to be resolved. |
|
I detected merge conflicts but could not start a task to address them. |
|
This PR has merge conflicts that need to be resolved. |
1 similar comment
|
This PR has merge conflicts that need to be resolved. |
|
I detected merge conflicts but could not start a task to address them. |
|
I detected merge conflicts but could not start a task to address them. |
2 similar comments
|
I detected merge conflicts but could not start a task to address them. |
|
I detected merge conflicts but could not start a task to address them. |
|
This PR has merge conflicts that need to be resolved. |
|
I detected merge conflicts but could not start a task to address them. |
|
This PR has merge conflicts that need to be resolved. |
4 similar comments
|
This PR has merge conflicts that need to be resolved. |
|
This PR has merge conflicts that need to be resolved. |
|
This PR has merge conflicts that need to be resolved. |
|
This PR has merge conflicts that need to be resolved. |
|
I detected merge conflicts but could not start a task to address them. |
abe85a3 to
617ff95
Compare
What problem this solves
The existing
label-pr-review-stateworkflow had several gaps in its state machine:awaiting-reviewwas only reachable via one narrow path (change-requester re-requested after author pushed), leaving new PRs, draft→ready transitions, and comment-only reviews unlabeledDISMISSEDreviews incorrectly counted as activeCHANGES_REQUESTED, blockingawaiting-reviewwhen they shouldn'tWhat changed
State machine overhaul:
awaiting-review(new default)CHANGES_REQUESTED→awaiting-authorBug fixes:
DISMISSEDreviews are now treated as neutral (excluded from the latest-state map), not as active change requestschecks.listForRefis now paginated (was capped at 100 runs, silently missing failed checks on large matrix builds)errorstate now correctly treated as CI failure (was only checkingfailure)removeLabel404s are swallowed as benign (label already gone)status,response.data.message) now included in failure logsEvent triggers added:
pull_request:opened, reopened, ready_for_review, synchronize, review_requestedpull_request_review:submitted, dismissedObservability:
core.infoon every decision path (draft / CI-pending / CI-failed / label chosen)core.debugfor individual check run detailsreconcileLabels(pr, desiredLabel)helper, also handlingstale-awaiting-authorcleanupBehavior change note
stale-awaiting-authoris now stripped on draft and CI-pending/failed paths (previously only stripped post-CI-passing). A PR with failing CI that then goes silent will fall out of stale-tracking — which is the correct behavior since failing-CI PRs shouldn't wear stale labels.