Skip to content

ci: propagate main's release-cut commitlint depth to develop - #613

Merged
MichaelTaylor3d merged 1 commit into
developfrom
ci/propagate-commitlint-release-cut-depth
Sep 14, 2026
Merged

MichaelTaylor3d merged 1 commit into
developfrom
ci/propagate-commitlint-release-cut-depth

Conversation

@MichaelTaylor3d

Copy link
Copy Markdown
Contributor

What

Copies main's .github/workflows/commitlint.yml to develop, verbatim. No hand edits, no reformatting — git diff origin/main -- .github/workflows/commitlint.yml is empty.

Why

On a pull_request event, GitHub runs the workflow definition from the PR's HEAD branch, not its base. So the develop -> main release PR (#612) executes develop's copy of this workflow — main's copy is never consulted.

Develop's copy lints the whole inherited main..develop range, so a release cut fails on immutable historical commit messages (the #579 / #584 / #593 era) that were written long before the PR exists.

main already carries the fix:

  • a commitDepth: 1 job gated on if: github.base_ref == 'main' for release cuts,
  • the full-range job gated on != 'main' for feature branches,
  • 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.

It never reached develop because the -s ours reconciliation at cd8ce7b8 records ancestry without bringing content across.

Risk

Low. One CI workflow file, already reviewed and already required-green on main.
Feature-branch PRs into develop keep the full-range lint (base_ref != 'main'); only a cut into main takes the depth-1 path.

🤖 Generated with Claude Code

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
MichaelTaylor3d merged commit 0ae3ef4 into develop Sep 14, 2026
9 checks passed
@MichaelTaylor3d
MichaelTaylor3d deleted the ci/propagate-commitlint-release-cut-depth branch September 14, 2026 01:55
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