-
Notifications
You must be signed in to change notification settings - Fork 909
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
feat(rules): add header-trim rule #3871
feat(rules): add header-trim rule #3871
Conversation
Thanks for taking care of this! |
Same as wagoid/commitlint-github-action#755, we met the
Any idea how to fix it? |
The error is thrown here: commitlint/@commitlint/lint/src/lint.ts Lines 78 to 86 in daa8b1b
all rules is declared reading the content of baseRules: commitlint/@commitlint/lint/src/lint.ts Lines 59 to 62 in daa8b1b
in version commitlint/@commitlint/rules/src/index.ts Line 55 in daa8b1b
Running command line from CLI doesn't throw any error. Could you please provide a minimal reproduction example in a separate issue? |
I have setup a small repo and I'm unable to reproduce the issue: Repository: https://github.com/marcalexiei/commlitlint-github-action-playground Action run ✅: https://github.com/marcalexiei/commlitlint-github-action-playground/actions/runs/7663989581/job/20887651012 Action run ❌: https://github.com/marcalexiei/commlitlint-github-action-playground/actions/runs/7664059035/job/20887826397 |
You are right, in my case, We should always use |
This is a Breaking change, right? It is not backwards compatible |
## [1.3.0](v1.2.0...v1.3.0) (2024-1-27) ### 🚀 Features * **about:** about page with every role ([#53](#53)) ([2233d28](2233d28)) ### 🧹 Chore * **deps:** bump @faker-js/faker from 8.3.1 to 8.4.0 ([#68](#68)) ([a6633be](a6633be)) * **deps:** bump @vue/test-utils from 2.4.3 to 2.4.4 ([#69](#69)) ([2bc7faf](2bc7faf)) * **deps:** bump happy-dom from 13.2.0 to 13.2.1 ([#54](#54)) ([a2882de](a2882de)) * **deps:** bump happy-dom from 13.2.1 to 13.3.1 ([#61](#61)) ([1f47fca](1f47fca)) * **deps:** bump husky from 8.0.3 to 9.0.1 ([#62](#62)) ([d5dc87e](d5dc87e)) * **deps:** bump husky from 9.0.1 to 9.0.6 ([#66](#66)) ([41d34e0](41d34e0)) * **deps:** bump primevue from 3.46.0 to 3.47.1 ([#64](#64)) ([ee028ca](ee028ca)) * **deps:** bump primevue from 3.47.1 to 3.47.2 ([#67](#67)) ([0c93a31](0c93a31)) * **deps:** bump the commitlint group with 2 updates ([#58](#58)) ([41637d3](41637d3)) * **deps:** bump the commitlint group with 2 updates ([#65](#65)) ([99f9b90](99f9b90)), closes [conventional-changelog/commitlint#3871](conventional-changelog/commitlint#3871) [#3865](https://github.com/antoinezanardi/werewolves-assistant-web-next/issues/3865) [conventional-changelog/commitlint#3867](conventional-changelog/commitlint#3867) [conventional-changelog/commitlint#3871](conventional-changelog/commitlint#3871) [#3865](https://github.com/antoinezanardi/werewolves-assistant-web-next/issues/3865) [conventional-changelog/commitlint#3867](conventional-changelog/commitlint#3867) [#3199](https://github.com/antoinezanardi/werewolves-assistant-web-next/issues/3199) [#3871](https://github.com/antoinezanardi/werewolves-assistant-web-next/issues/3871) [#3199](https://github.com/antoinezanardi/werewolves-assistant-web-next/issues/3199) [#3871](https://github.com/antoinezanardi/werewolves-assistant-web-next/issues/3871) * **deps:** bump the types group with 3 updates ([#57](#57)) ([88e5989](88e5989)) * **deps:** bump type-fest from 4.10.0 to 4.10.1 ([#63](#63)) ([eb763ad](eb763ad)) * **deps:** bump type-fest from 4.9.0 to 4.10.0 ([#60](#60)) ([e56c906](e56c906)) * **deps:** bump vue-eslint-parser from 9.4.0 to 9.4.2 ([#59](#59)) ([0990171](0990171)) * **nuxt-image:** downgrade nuxt image because prod problems ([#70](#70)) ([bed26f0](bed26f0))
You might be right. Let's see how many people will be affected. |
im also affected by this... |
Reading the comments, I can't see a fix that I can do for this, as I'm experiencing it too. Of course, other than to rollback to the previous version... |
@marcalexiei wdyt? Should we revert and and push a fix and add this again as breaking? |
Warning The source of this error is likely a mismatch of version between Detailed explanation can be found in a comment above. If someone is relying on a config which depends on an earlier version of npm update @commitlint/config-conventional I'm more than willing to find a fix for this issue. |
My project has Dependabot setup which was proposing a PR to just update Updating both at the same time, there is no issue. Should both of the above packages set a minimum version number for each of the other packages if there is that hard dependency between them both? Or some other mitigation to prevent this? |
A CI job for my PR started suddenly failing with the error:
I hadn't changed my PR's title before and it's been passing for weeks. Then it started failing for no apparent reason. (I at first tried to shorten my PR title thinking that that was the issue but after reading the error better I realized there's more to it...) here's my pr-linting.yaml name: PR linting
on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']
jobs:
lint-pr-title:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: npm install @commitlint/config-conventional
- uses: JulienKode/pull-request-name-linter-action@v0.5.0 and my PR title is
|
For the third time, if you having issue open a separate issue providing a MINIMAL REPRODUCTION EXAMPLE @escapedcat could you please lock the conversation so people might open separate issue instead of reporting them here? @maninak for what I'm seeing the action you are referring to seems to use commitlint 17: Please be sure to use consistent versions bettnwe |
This looks like an issue from https://github.com/JulienKode/pull-request-name-linter-action
Let me have a look |
Please open a separate issue for further discussions, thanks |
Description
Followup of #3199 (comment):
I have added a rule to check that header do not start or end with whitespace characters:
header-trim
The rule logs a different status message for each scenario (start / end / mixed).
I added the new rule to
@commitlint/config-conventional
config.Let me know if you prefer that the user manually opt-it or it I have to add it to other configurations.
Motivation and Context
#3199
Usage examples
How Has This Been Tested?
yarn test
The new rule has been tested in
@commitlint/rules/src/header-trim.test.ts
Types of changes
Checklist: