-
Notifications
You must be signed in to change notification settings - Fork 912
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
Feature/cz commitlint #2547
Feature/cz commitlint #2547
Conversation
Merge with origin master
…tests for cz-commitlint prompt field is working for prompt config, settled in commitlint config file, can be defined by shared configurations.
Awesome @curly210102 ! Thank you for your efforts! The prettier task fails: @armano2 @byCedric @marionebl would you mind taking a look at this PR? |
…o longer used dependencies
@curly210102 only comments from me is the The other thing is more of a question that is where do the scopes come from? I tried adding an enum to the scope config and could not get it to work. I would be cool if we could do something like we can with the "type". scope: {
description: 'What is the scope of this change (e.g. component or file name)',
enum: {
thing: {
description: 'References the thing component of the app',
title: 'Thing',
},
},
}, @curly210102 really like this by the way. |
@AdeAttwood thanks for review. I agree with the suggestion that move the test files flat with source code files to keep consistency. The scopes is configured by "rules" field. As commitlint.config.js designed, the parts of commit message is decided by "rules", so it can be worked on both "lint" and "prompt"."prompt" field is only worked with prompt process, add auxiliary messages.Thus, if you'd like to add scope enums, need set 'rules -> scope-enum' at first. rules: {
'scope-enum': [2, 'always', ['thing']]
},
prompt: {
questions: {
scope: {
description: 'What is the scope of this change (e.g. component or file name)',
enum: {
thing: {
description: 'References the thing component of the app',
title: 'Thing',
},
},
}
}
} |
…to keep consistency
Thanks for this @curly210102 ! |
Published under |
Have try the next version, features passed test.
Just optimize introductions, Make cz-commitlint searchable and easy to get start by curly210102 · Pull Request #2572 · conventional-changelog/commitlint (github.com)<#2572>
[https://opengraph.githubassets.com/c2592b9e5d718c800e140a10e7f8971e1e70127e21692f6099fc3d018d4ca9c0/conventional-changelog/commitlint/pull/2572]<https://github.com/conventional-changelog/commitlint/pull/2572>
Make cz-commitlint searchable and easy to get start by curly210102 · Pull Request #2572 · conventional-changelog/commitlint<#2572>
Description Update package.json and README.md of cz-commitlint package add keywords of package.json simplify README, only introduce important points official document: provide a better screenshot...
github.com
Sent from Outlook<http://aka.ms/weboutlook>
…________________________________
From: hannes ***@***.***>
Sent: Thursday, April 29, 2021 2:16 PM
To: conventional-changelog/commitlint ***@***.***>
Cc: Curly Brackets ***@***.***>; Mention ***@***.***>
Subject: Re: [conventional-changelog/commitlint] Feature/cz commitlint (#2547)
Published under next. Please give it a try.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#2547 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ASKNVMHSNRNU2V7CUBNV7ULTLD2ULANCNFSM42Z55NTQ>.
|
…elog (#7264) This commit updates to @commitlint/cz-commitlint, which adds the `scope` enum from commitlint without changing the interactive commit experience. Further motivation is explained in conventional-changelog/commitlint#2547 Co-authored-by: John Corser <xss@amazon.com>
…elog (aws-amplify#7264) This commit updates to @commitlint/cz-commitlint, which adds the `scope` enum from commitlint without changing the interactive commit experience. Further motivation is explained in conventional-changelog/commitlint#2547 Co-authored-by: John Corser <xss@amazon.com>
Description
commitizen
adapter: cz-commitlint, it based on inquirer and share commitlint.config.js withcommitizen
.e.g.@commitlint/config-conventional
Motivation and Context
Why I have to develop it
It is necessary to submit and lint with same rules. It is inconvenient and unreliable to configure two file for
commitlint
andcommitizen
. I investigated the possible solutions:commitlint/prompt
/commitlint/prompt-cli
: The interactive experience is not good.cz-customizable
: Not support async load.There is no perfect solution, so I tried to develop a new one, which is inspired by cz-conventional-changelog and compatible with the submission process of
commitlint/prompt
.It based on inquirer instead of vorpal, can be used with
commitizen
, also a beginning of "Rewrite @commitlint/prompt for better usability"(Refer from Roadmap).How it works
Screen.Recording.2021-04-13.at.3.13.38.AM.mov
Usage examples
Prompt Config
Configure Prompt Config of commitlint.config.js,customize the interactive steps.
For more detail: Introduction of Prompt Config
Command-line Interaction
You can try it out in @commitlint/cz-commitlint folder.
How Has This Been Tested?
I have covered unit tests from underlying utilities to top entry.
Types of changes
Checklist: