-
Notifications
You must be signed in to change notification settings - Fork 913
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
fix(is-ignored): ignore "amend!" commits #4024
fix(is-ignored): ignore "amend!" commits #4024
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Is this potentially a breaking change? |
I don't think so because this PR will only widen the type of ignored commits. Users won't be forced to update their configuration for this change. |
Yeah, that's always what you think till someone is opening an issue and complains that their setup is behaving differently now. @knocte wdyt? |
Not sure TBH, shouldn't this ignore list be a param list to a rule? |
Looks like we already have this? /*
* Array of functions that return true if commitlint should ignore the given message.
* Given array is merged with predefined functions, which consist of matchers like:
*
* - 'Merge pull request', 'Merge X into Y' or 'Merge branch X'
* - 'Revert X'
* - 'v1.2.3' (ie semver matcher)
* - 'Automatic merge X' or 'Auto-merged X into Y'
*
* To see full list, check https://github.com/conventional-changelog/commitlint/blob/master/%40commitlint/is-ignored/src/defaults.ts.
* To disable those ignores and run rules always, set `defaultIgnores: false` as shown below.
*/
ignores: [(commit) => commit === ''],
/*
* Whether commitlint uses the default ignore rules, see the description above.
*/
defaultIgnores: true,
/*
* Custom URL to show upon failure
*/ https://commitlint.js.org/reference/configuration.html#configuration-object-example |
So then this PR is changing the defaultIgnores? |
Yes, it does |
LGTM then |
🤞 |
Description
This PR allows a commit whose subject is prefixed with "amend!" to be ignored.
Motivation and Context
git-commit
supports the--fixup=[(amend|reword):]<commit>
option, which creates a commit whose subject is prefixed with "amend!". commitlint should ignore this, but currently, it does not.For more information about the
--fixup=[(amend|reword):]<commit>
option, please see the git-commit documentation.Usage examples
n/a
How Has This Been Tested?
According to the contribution guide.
Types of changes
Checklist: