Skip to content

Re-run changelog guard checks when a peer PR changes - #370

Merged
iliaal merged 1 commit into
masterfrom
ci/changelog-guard-peer-reruns
Nov 14, 2026
Merged

iliaal merged 1 commit into
masterfrom
ci/changelog-guard-peer-reruns

Conversation

@iliaal

@iliaal iliaal commented Nov 14, 2026

Copy link
Copy Markdown
Owner

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.md job 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.md job (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.py grows 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 stub gh now filters runs by event and head commit and serves their jobs. changelog_guard_mutate.py now 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 --pedantic reports no findings.


Generated by Claude Code

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>
@iliaal
iliaal merged commit 080dcaf into master Nov 14, 2026
41 checks passed
@iliaal
iliaal deleted the ci/changelog-guard-peer-reruns branch November 14, 2026 22:03
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.

2 participants