Skip to content

ci(ci): exempt mergeback PRs from commitlint - #111

Merged
MarTrepodi merged 1 commit into
developfrom
ci/commitlint-mergeback-exempt
Jul 12, 2026
Merged

ci(ci): exempt mergeback PRs from commitlint#111
MarTrepodi merged 1 commit into
developfrom
ci/commitlint-mergeback-exempt

Conversation

@MarTrepodi

Copy link
Copy Markdown
Collaborator

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 automated backmerge.yml PRs re-introduce main's own commits — including non-conventional squash titles like #106 (Update GitHub Actions checkout from v6 to v7) — which then fail type-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).

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>
@github-actions github-actions Bot added the ci Changes related to continuous integration processes label Jul 12, 2026
@MarTrepodi
MarTrepodi merged commit ffd8ac0 into develop Jul 12, 2026
15 checks passed
@MarTrepodi
MarTrepodi deleted the ci/commitlint-mergeback-exempt branch July 12, 2026 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Changes related to continuous integration processes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant