ci: propagate main's release-cut commitlint depth to develop - #613
Merged
MichaelTaylor3d merged 1 commit intoSep 14, 2026
Merged
Conversation
On a `pull_request` event GitHub runs the workflow definition from the PR's HEAD branch, not its base. A `develop -> main` release PR therefore executes develop's copy of `.github/workflows/commitlint.yml`, and main's copy is never consulted. Develop's copy lints the entire inherited `main..develop` range, so a release cut fails on immutable historical commit messages that were written long before the current PR. Main already carries the fix: a `commitDepth: 1` job gated on `github.base_ref == 'main'` for release cuts, the full-range job gated on `!= 'main'` for feature branches, and a PR-title lint that appends `(#PR_NUMBER)` before linting. Because the release-cut branch of that fix only ever runs from the HEAD branch of a cut, and cuts run from develop, it has never once applied to a cut. The file never reached develop because the `-s ours` reconciliation at cd8ce7b records ancestry without bringing any content across. This commit takes main's version verbatim -- it is already reviewed and already required-green on main. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
MichaelTaylor3d
deleted the
ci/propagate-commitlint-release-cut-depth
branch
September 14, 2026 01:55
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.
What
Copies
main's.github/workflows/commitlint.ymltodevelop, verbatim. No hand edits, no reformatting —git diff origin/main -- .github/workflows/commitlint.ymlis empty.Why
On a
pull_requestevent, GitHub runs the workflow definition from the PR's HEAD branch, not its base. So thedevelop -> mainrelease PR (#612) executes develop's copy of this workflow — main's copy is never consulted.Develop's copy lints the whole inherited
main..developrange, so a release cut fails on immutable historical commit messages (the #579 / #584 / #593 era) that were written long before the PR exists.mainalready carries the fix:commitDepth: 1job gated onif: github.base_ref == 'main'for release cuts,!= 'main'for feature branches,(#PR_NUMBER)before linting.Because the release-cut branch of that fix only ever runs from the HEAD branch of a cut, and cuts run from
develop, it has never once applied to a cut.It never reached
developbecause the-s oursreconciliation atcd8ce7b8records ancestry without bringing content across.Risk
Low. One CI workflow file, already reviewed and already required-green on
main.Feature-branch PRs into
developkeep the full-range lint (base_ref != 'main'); only a cut intomaintakes the depth-1 path.🤖 Generated with Claude Code