ci(ci): exempt mergeback PRs from commitlint - #111
Merged
Conversation
commitlint validated the entire PR range, so mergeback and automated back-merge PRs failed on main's own (non-conventional squash) commits that they re-introduce. Lint only commits this PR adds that are not already on main, and skip merge commits. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Follow-up to #109, which landed the changelog tooling but not this commitlint fix — the fix commit was pushed after #109 was merged, so it never reached develop.
Problem: the commitlint job lints the entire PR range (
--from base --to head). Mergeback PRs (like #110) and the automatedbackmerge.ymlPRs re-introducemain's own commits — including non-conventional squash titles like #106 (Update GitHub Actions checkout from v6 to v7) — which then failtype-empty/subject-empty.Fix: lint only the commits a PR actually introduces that are not already on
main, and skip merge commits (git rev-list --no-merges base..head --not FETCH_HEAD). Feature PRs stay strict; mergeback/back-merge PRs pass.Verified locally: mergeback range → empty (exempt); a normal feature range → still lists its conventional commits.
Once merged, re-running commitlint on #110 should pass (its merge-ref picks up the updated develop).