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 · 9 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
papazof added a commit to nubificus/vaccel that referenced this issue Jul 9, 2024
- Set dependabot commit message prefix to "ci(deps)"
- Do not validate dependabot commit messages with commitlint: We cannot use a
  custom format for dependabot commit messages until
  dependabot/dependabot-core#2445 is resolved, so skip validation for
  now

Signed-off-by: Kostis Papazafeiropoulos <papazof@gmail.com>
papazof added a commit to nubificus/vaccel that referenced this issue Jul 9, 2024
- Set dependabot commit message prefix to "ci(deps)"
- Do not validate dependabot commit messages with commitlint: We cannot use a
  custom format for dependabot commit messages until
  dependabot/dependabot-core#2445 is resolved, so skip validation for
  now

Signed-off-by: Kostis Papazafeiropoulos <papazof@gmail.com>
papazof added a commit to nubificus/vaccel that referenced this issue Jul 9, 2024
- Set dependabot commit message prefix to "ci(deps)"
- Do not validate dependabot commit messages with commitlint: We cannot use a
  custom format for dependabot commit messages until
  dependabot/dependabot-core#2445 is resolved, so skip validation for
  now

Signed-off-by: Kostis Papazafeiropoulos <papazof@gmail.com>
papazof added a commit to nubificus/vaccel that referenced this issue Jul 9, 2024
- Set dependabot commit message prefix to "ci(deps)"
- Do not validate dependabot commit messages with commitlint: We cannot use a
  custom format for dependabot commit messages until
  dependabot/dependabot-core#2445 is resolved, so skip validation for
  now

Signed-off-by: Kostis Papazafeiropoulos <papazof@gmail.com>
papazof added a commit to nubificus/vaccel that referenced this issue Jul 9, 2024
- Set dependabot commit message prefix to "ci(deps)"
- Do not validate dependabot commit messages with commitlint: We cannot use a
  custom format for dependabot commit messages until
  dependabot/dependabot-core#2445 is resolved, so skip validation for
  now

Signed-off-by: Kostis Papazafeiropoulos <papazof@gmail.com>
papazof added a commit to nubificus/vaccel that referenced this issue Jul 9, 2024
- Set dependabot commit message prefix to "ci(deps)"
- Do not validate dependabot commit messages with commitlint: We cannot use a
  custom format for dependabot commit messages until
  dependabot/dependabot-core#2445 is resolved, so skip validation for
  now

Signed-off-by: Kostis Papazafeiropoulos <papazof@gmail.com>
papazof added a commit to nubificus/vaccel that referenced this issue Jul 16, 2024
- Set dependabot commit message prefix to "ci(deps)"
- Do not validate dependabot commit messages with commitlint: We cannot use a
  custom format for dependabot commit messages until
  dependabot/dependabot-core#2445 is resolved, so skip validation for
  now

Signed-off-by: Kostis Papazafeiropoulos <papazof@gmail.com>
github-actions bot pushed a commit to nubificus/vaccel that referenced this issue Jul 16, 2024
- Set dependabot commit message prefix to "ci(deps)"
- Do not validate dependabot commit messages with commitlint: We cannot use a
  custom format for dependabot commit messages until
  dependabot/dependabot-core#2445 is resolved, so skip validation for
  now

PR: #123
Signed-off-by: Kostis Papazafeiropoulos <papazof@gmail.com>
Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk>
Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
github-actions bot pushed a commit to nubificus/vaccel that referenced this issue Jul 16, 2024
- Set dependabot commit message prefix to "ci(deps)"
- Do not validate dependabot commit messages with commitlint: We cannot use a
  custom format for dependabot commit messages until
  dependabot/dependabot-core#2445 is resolved, so skip validation for
  now

PR: #123
Signed-off-by: Kostis Papazafeiropoulos <papazof@gmail.com>
Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk>
Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
papazof added a commit to nubificus/vaccel that referenced this issue Jul 16, 2024
- Set dependabot commit message prefix to "ci(deps)"
- Do not validate dependabot commit messages with commitlint: We cannot use a
  custom format for dependabot commit messages until
  dependabot/dependabot-core#2445 is resolved, so skip validation for
  now

PR: #123
Signed-off-by: Kostis Papazafeiropoulos <papazof@gmail.com>
Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk>
Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
@keikoro
Copy link

keikoro commented Oct 9, 2024

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

@felipecrs I don't know how much of a difference this would make for grouped updates. I removed the URLs from the first line of an update to a group of four dependencies and it's still too long.

Interestingly, in a PR which would update five dependencies at once, they are put in a Markdown table instead. Which would work with the URLs removed. Though that PR exceeds the allowed subject length. 🙃

I feel like an on/off switch for the inclusion of project URLs for dependencies in Dependabot messages might be the most useful solution. Or, better yet, a differentiation between Git commit messages and PR (meta) info. That Markdown table for grouped dependencies isn't useful outside of Markdown-based UIs, and neither are Markdown-formatted URLs.

Edit: A combo solution could be a config option for commit message verbosity – "minimal, plain text" (without URLs) vs. "verbose" (Markdown-formatted, with URLs).

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

7 participants