Repository navigation
fix(ci): exclude trunk-reachable history from release-PR commit gate - #1153
Merged
Merged
Conversation
The Commit Messages job validated merge-base(base, head)..head, so a consumer's first release PR (release/X.Y.Z -> main) re-linted the entire pre-migration history and one non-compliant historical commit blocked the whole train. validate-commit-range gains --exclude-reachable REF and the scaffolded ci.yml passes origin/dev on non-dev PRs, dropping commits already gated (or grandfathered) on their way into trunk. No-op on dev PRs whose base is dev. Refs: #1149
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
A freshly migrated consumer's first release PR (
release/X.Y.Z→main)re-lints its entire pre-migration history: the
Commit Messagesjob validatesmerge-base(base, head)..head, which reaches back to the last release — commitsmerged before the commit gate existed. One non-compliant historical commit
(immutable, non-merge, human-authored → no exemption) permanently blocks the
train at the worst possible moment.
Fix (issue preference #1 — self-healing, no per-repo SHA list)
validate-commit-rangegains a repeatable--exclude-reachable REFthatappends
^REFto thegit logrange.ci.ymlcommit-checksfetches the trunk and passes--exclude-reachable origin/devon non-dev PRs. Commits already reachablefrom trunk were gated (or grandfathered) on their way in and are not
re-litigated.
Tests
TestReadCommitsbuilds a main→dev→release topology and asserts atrunk-grandfathered commit is dropped with
--exclude-reachableand keptwithout it. Full
validate-commit-rangesuite green (36 passed).Closes #1149