Skip to content

ci: fix migration-policy false positives from shallow base fetch - #12

Merged
thedancingdeveloper merged 1 commit into
mainfrom
ci/fix-migration-policy-range
Aug 24, 2026
Merged

ci: fix migration-policy false positives from shallow base fetch#12
thedancingdeveloper merged 1 commit into
mainfrom
ci/fix-migration-policy-range

Conversation

@thedancingdeveloper

Copy link
Copy Markdown
Collaborator

Propagates the fix already merged in librtbit-upnp-serve (#4). The script re-fetched the base ref --depth=1 despite the workflow checking out full history; the shallow graft made origin/BASE..HEAD reappear historical base commits after an Update-branch merge, tripping the commit-metadata rule on commits the PR never touched. Fix: fetch base full-depth + scope to merge-base(BASE,HEAD)..HEAD. No change to what the policy forbids.

The policy.yml checkout already fetches full history, but this script then re-fetched the base ref with --depth=1. A shallow base ref grafts away its ancestry, so origin/BASE..HEAD stopped excluding the base tip's ancestors; on a PR branch that merged the base in (Update branch) historical base commits reappeared in the range and tripped the commit-metadata rule. Fetch the base full-depth and scope the scan to merge-base(BASE,HEAD)..HEAD. No change to what the policy forbids.
@thedancingdeveloper
thedancingdeveloper merged commit b1746bf into main Aug 24, 2026
3 checks passed
@thedancingdeveloper
thedancingdeveloper deleted the ci/fix-migration-policy-range branch August 24, 2026 02:17
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