Repository navigation
Re-run changelog guard checks when a peer PR changes - #370
Merged
Merged
Conversation
A peer collision now clears when the lower-numbered PR is pushed, reopened, retargeted, merged or closed, by re-running only the later PRs' Check CHANGELOG.md job. Lower-numbered PRs that don't edit the changelog are skipped again. Self-test grows to 33 cases; the mutation script covers each docstring clause, regex and API filter (49 of 49). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Before: when a lower-numbered open PR made this one fail ("conflicts with open #1"), the failure cleared only if #1 closed unmerged or merged with a changelog change. If #1 was force-pushed without its entry, merged with a final diff that doesn't touch CHANGELOG.md, or retargeted, the later PR stayed red and its message asked for a new commit. A PR that conflicted with the base branch also got a second, wrong "conflicts with open #N" line for any lower-numbered PR that doesn't edit the changelog, and every lower-numbered PR was fetched.
After: a push, reopen, retarget, merge or close of any PR re-runs the
Check CHANGELOG.mdjob of the higher-numbered open PRs that edit the changelog (for a retarget, on both the old and the new branch), so a peer failure clears as soon as its cause goes. The message now says the check re-runs by itself. Lower-numbered PRs that don't edit CHANGELOG.md are skipped again, matching the docstring.How: the re-run job now re-runs only the PR's newest
Check CHANGELOG.mdjob (actions/jobs/{id}/rerun), so a re-run doesn't fan out into more peer re-runs. It passes over runs that skipped the check (a title edit) and leaves queued or running jobs alone. Title-only edits get their own concurrency group, so they never cancel a check in progress.changelog_guard_test.pygrows from 21 to 33 cases, including each way a peer clears (force-push, merge without a changelog change, retarget, close) and a stale PR behind a lower-numbered PR that doesn't touch the changelog. The stubghnow filters runs by event and head commit and serves their jobs.changelog_guard_mutate.pynow has one mutant per docstring clause, regex and API filter: 49 of 49 fail a test.Not proven here: the new triggers on a live repo, since there's no scratch repo to run them on. zizmor
--pedanticreports no findings.Generated by Claude Code