-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Comments
This goes along with a similar issue #2056, where Dependabot will also make the commit header too long |
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
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
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 |
Or perhaps it should be smarter when URLs are detected. There is no way to break an URL into multiple lines. |
Just found out via https://stackoverflow.com/a/60195181 that commitlint indeed already has an /*
* 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)],
} |
This is temporary fix due to dependabot/dependabot-core#2445
This is temporary fix due to dependabot/dependabot-core#2445
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
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>
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.
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.
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.
- ignore dependabot commits due to length dependabot/dependabot-core#2445
* 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
- 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>
- 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>
- 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>
- 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>
- 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>
- 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>
- 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>
- 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>
- 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>
- 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>
@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). |
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:
https://github.com/felipecassiors/megatar/pull/13/checks?check_run_id=969926394#step:4:19
The text was updated successfully, but these errors were encountered: