Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

commitlint: body's lines must not be longer than 100 characters [body-max-line-length] #2445

Open
felipecrs opened this issue Aug 11, 2020 · 8 comments
Labels
F: pull-requests Issues about Dependabot pull requests Keep Exempt this from being marked by stalebot T: bug 🐞 Something isn't working T: feature-request Requests for new features

Comments

@felipecrs
Copy link

felipecrs commented Aug 11, 2020

Dependabot commit messages body line lengths do not conform with commitlint's defaults.

Take a look at felipecrs/megatar#13 and felipecrs/megatar#14

It fails with:

⧗   input: build(deps-dev): bump @typescript-eslint/eslint-plugin

Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 3.8.0 to 3.9.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v3.9.0/packages/eslint-plugin)

Signed-off-by: dependabot[bot] <support@github.com>
✖   body's lines must not be longer than 100 characters [body-max-line-length]

✖   found 1 problems, 0 warnings
ⓘ   Get help: https://www.conventionalcommits.org/

https://github.com/felipecassiors/megatar/pull/13/checks?check_run_id=969926394#step:4:19

@ttshivers
Copy link
Contributor

This goes along with a similar issue #2056, where Dependabot will also make the commit header too long

louh added a commit to streetmix/streetmix that referenced this issue Jan 25, 2021
Dependabot PRs can break tests because their commits exceed commitlint's
very strict line length rules, so we disable them for the commit body and
footer, and revise them for headers.

The issues are documented at dependabot-core here:
dependabot/dependabot-core#2445
dependabot/dependabot-core#2056

We adopt a config from here:
https://github.com/vidavidorra/commitlint-config/blob/master/commitlint.config.js
louh added a commit to streetmix/streetmix that referenced this issue Jan 25, 2021
Dependabot PRs can break tests because their commits exceed commitlint's
very strict line length rules, so we disable them for the commit body and
footer, and revise them for headers.

The issues are documented at dependabot-core here:
dependabot/dependabot-core#2445
dependabot/dependabot-core#2056

We adopt a config from here:
https://github.com/vidavidorra/commitlint-config/blob/master/commitlint.config.js
@caugner
Copy link

caugner commented Oct 22, 2021

I don't think this is a bug in Dependabot, but rather it should be easier to make commitlint ignore Dependabot's commits. One solution would be to add an ignores option to the header-max-length rule which accepts one or more regular expressions.

@felipecrs
Copy link
Author

Or perhaps it should be smarter when URLs are detected. There is no way to break an URL into multiple lines.

@caugner
Copy link

caugner commented Oct 22, 2021

Just found out via https://stackoverflow.com/a/60195181 that commitlint indeed already has an ignores option:

  /*
   * Functions that return true if commitlint should ignore the given message.
   */
  ignores: [(commit) => commit === ''],

So you can make commitlint ignore Dependabot's commits as follows:

// commitlint.config.js
module.exports = {
  extends: ['@commitlint/config-conventional'],
  ignores: [(message) => /^Bumps \[.+]\(.+\) from .+ to .+\.$/m.test(message)],
}

kis87988 added a commit to zgzgorg/iam-backend that referenced this issue Nov 23, 2021
kis87988 added a commit to zgzgorg/iam-backend that referenced this issue Nov 23, 2021
@jurre jurre added F: pull-requests Issues about Dependabot pull requests T: feature-request Requests for new features labels Nov 26, 2021
@jurre

This comment was marked as outdated.

@felipecrs

This comment was marked as outdated.

@jurre

This comment was marked as outdated.

simonpasquier added a commit to simonpasquier/observability-operator that referenced this issue Aug 16, 2023
Dependabot commit messages may not respect the 100-chars max length
rule. We need to have an exception for all Dependabot commits.

See dependabot/dependabot-core#2445

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
ferrarimarco added a commit to super-linter/super-linter that referenced this issue Dec 20, 2023
Dependabot doesn't allow configuring the max commit message line length
until dependabot/dependabot-core#2445 is
resolved, so we cannot validate Dependabot commits at this time.
ferrarimarco added a commit to super-linter/super-linter that referenced this issue Dec 20, 2023
Dependabot doesn't allow configuring the max commit message line length
until dependabot/dependabot-core#2445 is
resolved, so we cannot validate Dependabot commits at this time.
ferrarimarco added a commit to super-linter/super-linter that referenced this issue Dec 20, 2023
Dependabot doesn't allow configuring the max commit message line length
until dependabot/dependabot-core#2445 is
resolved, so we cannot validate Dependabot commits at this time.
aquint-zama added a commit to aquint-zama/test-semantic-release that referenced this issue Feb 7, 2024
Vunovati added a commit to pinojs/pino-opentelemetry-transport that referenced this issue Feb 7, 2024
Vunovati added a commit to pinojs/pino-opentelemetry-transport that referenced this issue Feb 7, 2024
* feat: add commitlint and conventional config

- ignore dependabot commits due to length
  dependabot/dependabot-core#2445

* chore: add action validating commits with commit-lint

* chore: make dependabot group prod and dev deps

* feat: add release-please workflow

* chore: publish on release PR merge
@jonjanego jonjanego added the Keep Exempt this from being marked by stalebot label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F: pull-requests Issues about Dependabot pull requests Keep Exempt this from being marked by stalebot T: bug 🐞 Something isn't working T: feature-request Requests for new features
Projects
None yet
Development

No branches or pull requests

6 participants