fix(ci): exempt dependabot from body/footer line-length rules#241
Merged
AbongileBoja merged 1 commit intodevelopfrom Apr 28, 2026
Merged
fix(ci): exempt dependabot from body/footer line-length rules#241AbongileBoja merged 1 commit intodevelopfrom
AbongileBoja merged 1 commit intodevelopfrom
Conversation
Owner
Author
|
@dependabot rebase |
c03a347 to
872ebb3
Compare
Dependabot's grouped-update commits embed a markdown changelog table whose rows legitimately exceed 120 chars per line, blocking every grouped dependabot PR (#211, #214, #212, #209, etc.). Migrate from .commitlintrc.json to commitlint.config.js so we can use the `ignores` predicate to skip commits stamped with the dependabot[bot] sign-off trailer. Body/footer line-length rules remain enforced at 120 chars for human commits. Closes #240
872ebb3 to
c85d511
Compare
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.
Summary
Migrate commitlint from
.commitlintrc.jsontocommitlint.config.jsso we can use theignorespredicate to skip dependabot commits while keeping the body/footer line-length rules enforced for human commits at 120 chars.Why this approach (not "drop the rules entirely")
Dropping the rules outright was the quick fix. The enterprise-grade answer — and the one issue #240 itself flagged as preferable — is to keep the discipline for humans and surgically exempt the bot. Dependabot grouped commits embed a markdown changelog table whose rows legitimately exceed 120 chars; humans embedding 200-char prose lines in a body should still be flagged.
How it works
ignores: [(c) => /^Signed-off-by: dependabot\[bot\]/m.test(c)]— every dependabot commit carries aSigned-off-by: dependabot[bot]trailer, which we detect to skip linting.Test plan
npx commitlintagainst a real grouped dependabot commit (chore(deps): Bump the actions-core group across 1 directory with 5 updates #211 head) — passes (ignored)npx commitlintagainst a synthetic human commit with a 200-char body line — rejected withbody-max-line-lengthnpx commitlintagainst a normal short human commit — passesheader-max-length: 100still enforcedcommit-msghook comment updated to reference new config fileCloses #240