-
Notifications
You must be signed in to change notification settings - Fork 202
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(additionalQuestion): support additional questions for commit #243
Conversation
@leonardoanalista Can you please check this PR and see if ti can be merged soon ? We are in need of this feature urgently. |
.cz-config.js
Outdated
@@ -25,7 +25,20 @@ module.exports = { | |||
{ value: 'revert', name: 'revert: Revert to a commit' }, | |||
{ value: 'WIP', name: 'WIP: Work in progress' }, | |||
], | |||
|
|||
additionalQuestions: [ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@parveen14 please remove explicit data here. additional questions should be optional. In here, I think it must be empty array.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I agree. You could add it to the README docs for this field and leave the other files as is because most people won't use it straight away.
I believe the subject, body, and footer are ideal for most cases and are already decent/solid defaults.
The new field additionalQuestions
could exist, no problems with it.
We need to think about the initial API and keep it as simple as possible for someone new starting to use this package. We don't want them to feel overwhelmed by the number of options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@samarpan-b @leonardoanalista Yes, got it.
changes done and additionalQuestions
removed from .cz-config.js as its optional field.
we have additionalQuestions
in readme and config example file.
.cz-config.js
Outdated
scopes: [{ name: 'accounts' }, { name: 'admin' }, { name: 'exampleScope' }, { name: 'changeMe' }], | ||
|
||
allowTicketNumber: false, | ||
isTicketNumberRequired: false, | ||
ticketNumberPrefix: 'TICKET-', | ||
ticketNumberSuffix:'', | ||
ticketNumberSuffix: '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please revert these changes ?
@@ -201,4 +220,4 @@ my items are: | |||
|
|||
|
|||
|
|||
Leonardo Correa | |||
Leonardo Correa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no changes done on this line , not sure why it showing as same line removed & added
dc6ff87
to
5028a05
Compare
cz-config-EXAMPLE.js
Outdated
@@ -24,6 +24,21 @@ module.exports = { | |||
{ value: 'WIP', name: 'WIP: Work in progress' }, | |||
], | |||
|
|||
additionalQuestions: [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
I believe the "standard" questions are suitable for most users.
Most people are going to copy and paste this example file. My only concern is they would be overwhelmed by the additional questions.
The README file explains how to use the new field additionalQuestions
if they need it.
So it would LGTM if we leave this file cz-config-EXAMPLE.js
untouched like a bare minimum to get started. Does it make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leonardoanalista , Got it, readme is sufficient enough to explain additionalQuestions
options.
Removed additionalQuestions
from this file now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @parveen14 and @samarpan-b!
@samarpan-b @leonardoanalista can we merge this PR ? |
You can add n number of additional questions for commit.
And append answers to the body of commit message.
These question can help you to create smart-commit and pass information to third party like jira (with help of mapping)