Repository navigation
fix(review-pr): defer approval on fork PRs until CI passes - #1406
Closed
worktrunk-bot wants to merge 1 commit into
Closed
worktrunk-bot wants to merge 1 commit into
worktrunk-bot wants to merge 1 commit into
Conversation
GitHub's dismiss API returns 404 on cross-repository PRs, so the bot cannot undo an approval if CI fails. This left stale approvals contradicting red CI on fork PRs (observed in run 22847633269 on #1404). The fix defers approval to after CI passes for fork PRs, eliminating the stale-approval window entirely. Fixes #1405 Co-Authored-By: Claude Opus 4.6 <[email protected]>
This was referenced Mar 9, 2026
Owner
|
are you sure? we can't dismiss approvals on fork PRs?! |
Collaborator
Author
|
Good catch questioning this — I was wrong. Dismissing approvals on fork PRs works fine. The actual root cause was the wrong HTTP method: I found this while investigating the earlier run on the same fork PR (22845135867), where the bot tried both methods back-to-back — POST returned 404, PUT succeeded. I posted the correction on #1405. #1407 (adding |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Context
In run 22847633269 reviewing #1404 (a fork PR), the bot approved commit
c9bdb36, then CI failed (cargo fmt). The bot tried to dismiss its approval but got HTTP 404 — GitHub doesn't expose the dismiss endpoint for cross-repository PRs. This left a stale approval contradicting red CI until the author pushed a fix.The fix reverses the order for fork PRs: review with COMMENT first, wait for CI, then approve only if CI passes.
Fixes #1405
🤖 Generated with Claude Code