Skip to content
This repository was archived by the owner on Aug 20, 2026. It is now read-only.

Commit c99681b

Browse files
committed
ci: load commitlint.config.ts and exempt Dependabot commits
wagoid/commitlint-github-action@v6 defaults configFile to ./commitlint.config.mjs, which this repo has never had (it uses commitlint.config.ts) -- per the action's own documented fallback, a missing configFile silently loads bare @commitlint/config-conventional instead, meaning this repo's own type-enum restriction has never actually been enforced in CI, and the Dependabot exemption added in this same commit would have had no effect without it. dependabot-auto-merge.yml lands Dependabot's rebase-merged commits on main verbatim, including its generated Bumps/Release notes/Changelog body, which routinely contains a markdown link line over the inherited body-max-line-length limit and cannot be reformatted by this repo -- the ignores predicate skips linting entirely for those commits, identified by the Signed-off-by: dependabot[bot] trailer fetch-metadata's auto-merge always appends, while every rule stays fully enforced for human-authored commits. Verified via the real commitlint CLI: a synthetic Dependabot message with an over-length body line now passes, an invalid type on a human commit still correctly fails, and a human commit with an over-length body line still correctly fails.
1 parent 188dc27 commit c99681b

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
with:
2020
fetch-depth: 0
2121
- uses: wagoid/commitlint-github-action@v6
22+
with:
23+
configFile: ./commitlint.config.ts
2224

2325
lint:
2426
name: Lint

commitlint.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ export default {
55
rules: {
66
'type-enum': [2, 'always', commitTypes.map((t) => t.type)],
77
},
8+
// dependabot-auto-merge.yml lands Dependabot's rebase-merged commits on main verbatim, including its generated Bumps/Release notes/Changelog body, which routinely contains a markdown link line over the inherited body-max-line-length limit and cannot be reformatted by this repo. Skip linting entirely for those commits, identified by the "Signed-off-by: dependabot[bot]" trailer that fetch-metadata's auto-merge always appends, while leaving every rule fully enforced for human-authored commits.
9+
ignores: [(message: string) => /^Signed-off-by: dependabot\[bot\]/m.test(message)],
810
};

0 commit comments

Comments
 (0)