Skip to content

[Fix] Link review gate Details to the workflow run - #2204

Merged
edelauna merged 2 commits into
mainfrom
fix/review-gate-details-link-v2
Oct 27, 2026
Merged

edelauna merged 2 commits into
mainfrom
fix/review-gate-details-link-v2

Conversation

@zoomote2

@zoomote2 zoomote2 Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

​Created by Roomote. Follow up by mentioning @roomote, in the web UI, or in Discord.

What changed

The Zoo Code / PR review gate commit statuses published by the PR review-state workflow (.github/workflows/label-pr-review-state.yml) now link their Details target 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 comparing target_url. The test harness for the workflow gained runId/serverUrl context, existing assertions expect the workflow run target_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 Details link 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 Details on the Zoo Code / PR review gate status 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.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one): 1
  • coderabbit-review-active

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zoomote2

zoomote2 Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor Author

1 issue outstanding. See session

  • .github/workflows/label-pr-review-state.yml:659 — legacy gate statuses keep the PR-page Details link: the dedupe skip no longer compares target_url, so already-published statuses with identical state+description are never republished with the workflow-run URL

Reviewed e1a29c0

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review status

This 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. community-approved is managed the same way — do not add or remove it manually. It signals a fresh community code approval for the current head as an advisory priority only; maintainer review is still required.

@codecov

codecov Bot commented Oct 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Comment on lines 659 to +660
if (latestGateStatus?.state === state &&
latestGateStatus.description === description &&
latestGateStatus.target_url === pr.html_url) {
latestGateStatus.description === description) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Suggested change
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 ?? '')) {

@edelauna
edelauna marked this pull request as ready for review October 27, 2026 01:47
@edelauna
edelauna enabled auto-merge October 27, 2026 01:47
@edelauna
edelauna added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 764db84 Oct 27, 2026
34 checks passed
@edelauna
edelauna deleted the fix/review-gate-details-link-v2 branch October 27, 2026 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant