Repository navigation
[Fix] Link review gate Details to the workflow run - #2204
Conversation
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one): 1
Please check the settings in the CodeRabbit UI or the
|
|
1 issue outstanding. See session
Reviewed e1a29c0 |
Review statusThis PR was opened by an automated account. A human maintainer must verify the change intent, provenance, and validation before merging. Current step: The required review sequence passed. Remaining merge requirements apply. Review-state labels are managed by this workflow; do not edit them manually. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
| if (latestGateStatus?.state === state && | ||
| latestGateStatus.description === description && | ||
| latestGateStatus.target_url === pr.html_url) { | ||
| latestGateStatus.description === description) { |
There was a problem hiding this comment.
Low: removing target_url from the dedupe means statuses already published with the legacy PR-page URL and an identical state+description are never republished, so PRs that were already open at deploy time keep the old PR-page Details link until their gate state/description changes or a new push lands (statuses are per-SHA). The existing does not republish an unchanged review gate status test pins exactly this behavior, so if the stale-window tradeoff is intended feel free to disregard — otherwise a one-time migration check keeps the skip semantics while correcting legacy URLs exactly once:
| if (latestGateStatus?.state === state && | |
| latestGateStatus.description === description && | |
| latestGateStatus.target_url === pr.html_url) { | |
| latestGateStatus.description === description) { | |
| if (latestGateStatus?.state === state && | |
| latestGateStatus.description === description && | |
| /\/actions\/runs\/\d+$/.test(latestGateStatus.target_url ?? '')) { |
What changed
The
Zoo Code / PR review gatecommit statuses published by the PR review-state workflow (.github/workflows/label-pr-review-state.yml) now link theirDetailstarget to the workflow run URL (${context.serverUrl}/${owner}/${repo}/actions/runs/${context.runId}) instead of the pull request URL. The skip-if-unchanged check now dedupes on state and description only, no longer comparingtarget_url. The test harness for the workflow gainedrunId/serverUrlcontext, existing assertions expect the workflow runtarget_url, and a new test covers republication when the status content changes.Why this change was made
Pointing the gate status at the PR page told reviewers nothing about which workflow run produced the gate decision; linking to the workflow run makes the
Detailslink actionable. Since the target URL is now derived from the current run rather than the PR, it no longer needs to participate in the dedupe comparison.Supersedes #1460 — that PR cannot be merged because its author account was deleted.
Impact
Reviewers clicking
Detailson theZoo Code / PR review gatestatus land on the workflow run that produced it. No extension runtime behavior changes; only the GitHub Actions workflow script and its test harness are affected.