Skip to content

fix(ci): exempt dependabot from body/footer line-length rules#241

Merged
AbongileBoja merged 1 commit intodevelopfrom
fix/240-commitlint-body-line-length
Apr 28, 2026
Merged

fix(ci): exempt dependabot from body/footer line-length rules#241
AbongileBoja merged 1 commit intodevelopfrom
fix/240-commitlint-body-line-length

Conversation

@AbongileBoja
Copy link
Copy Markdown
Owner

@AbongileBoja AbongileBoja commented Apr 28, 2026

Summary

Migrate commitlint from .commitlintrc.json to commitlint.config.js so we can use the ignores predicate 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 a Signed-off-by: dependabot[bot] trailer, which we detect to skip linting.

Test plan

  • npx commitlint against a real grouped dependabot commit (chore(deps): Bump the actions-core group across 1 directory with 5 updates #211 head) — passes (ignored)
  • npx commitlint against a synthetic human commit with a 200-char body line — rejected with body-max-line-length
  • npx commitlint against a normal short human commit — passes
  • header-max-length: 100 still enforced
  • Husky commit-msg hook comment updated to reference new config file

Closes #240

@AbongileBoja AbongileBoja enabled auto-merge (squash) April 28, 2026 16:02
@AbongileBoja
Copy link
Copy Markdown
Owner Author

@dependabot rebase

@AbongileBoja AbongileBoja force-pushed the fix/240-commitlint-body-line-length branch from c03a347 to 872ebb3 Compare April 28, 2026 16:07
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
@AbongileBoja AbongileBoja force-pushed the fix/240-commitlint-body-line-length branch from 872ebb3 to c85d511 Compare April 28, 2026 19:13
@AbongileBoja AbongileBoja changed the title fix(ci): drop body-max-line-length and footer-max-line-length rules fix(ci): exempt dependabot from body/footer line-length rules Apr 28, 2026
@github-actions
Copy link
Copy Markdown

Code Coverage

Package Line Rate Branch Rate Complexity Health
QuerySpec.Analyzers 93% 84% 133
QuerySpec.Analyzers.CodeFixes 90% 70% 50
QuerySpec.Core 93% 84% 959
QuerySpec.DependencyInjection 92% 75% 43
QuerySpec.EFCore 86% 77% 303
Summary 91% (2118 / 2316) 81% (930 / 1143) 1488

@AbongileBoja AbongileBoja merged commit 1f10ae1 into develop Apr 28, 2026
12 checks passed
@AbongileBoja AbongileBoja deleted the fix/240-commitlint-body-line-length branch April 28, 2026 19:22
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.

ci: commitlint body-max-line-length blocks every grouped dependabot PR

1 participant