feat: adds "ticketNumberSuffix" and "ticketNumberPosition" config options#102
feat: adds "ticketNumberSuffix" and "ticketNumberPosition" config options#102dudekaa wants to merge 1 commit into
Conversation
leonardoanalista
left a comment
There was a problem hiding this comment.
thanks for the PR, it is looking good.
| * **appendBranchNameToCommitMessage**: If you use `cz-customizable` with `cz-customizable-ghooks`, you can get the branch name automatically appended to the commit message. This is done by a commit hook on `cz-customizable-ghooks`. This option has been added on `cz-customizable-ghooks`, v1.3.0. Default value is `true`. | ||
| * **ticketNumberPrefix**: {string, default 'ISSUES CLOSED:'}: Set custom prefix for footer ticker number. | ||
| * **ticketNumberSuffix**: {string, default ' '}: Set custom prefix for footer ticker number. | ||
| * **ticketNumberPosition**: {string <small>[ 'first', 'standard' or 'last' ]</small>, default none}: Set custom placement for footer ticker number. |
There was a problem hiding this comment.
what is the difference between none and standard. Maybe default could be standard?
There was a problem hiding this comment.
"standard" is default value here, none here means undefined. I saw this wording on lines 124, 125 of this file. And got me confused at first too...
| ticketNumberPosition: 'last', | ||
| }; | ||
|
|
||
| expect(buildCommit(answersTicketNumberSuffix, options)).toEqual('feat(app): this is a new feature12345'); |
There was a problem hiding this comment.
does ticket number need space here?
There was a problem hiding this comment.
not sure I fully understand you here. Space character is default for ticketNumberSuffix, so it will be there. But it doesn't make really sense, thus implementing ticketNumberSuffix option in first place, and in this test case its set to '' (empty string) on line 151, as I find it "most common use case" for setting ticketNumberPosition to "last"
There was a problem hiding this comment.
I m referring to the result 'feat(app): this is a new feature12345'.
Do you intent to have 'feat(app): this is a new feature12345' or 'feat(app): this is a new feature 12345'? Note space before 12345
There was a problem hiding this comment.
I let this to ticketNumberPrefix option we already have but it will be nice to show it here. That's right.
leonardoanalista
left a comment
There was a problem hiding this comment.
Thanks for the PT @dudekaa ! It looks good to me.
|
@dudekaa @leonardoanalista can we get this PR "across the line" please? I would really like to see this feature! 😄 |
|
We like to see ticketNumberSuffix feature too, it also need in our team's policy 👍 |
Hi
thanks you for making this tool happen in first place.
Back to PR, in our "development setup", we use something like "ticket number in header first" policy, mainly because of other tooling in place, etc. So I came up with this adjustment which allows everyone to use this too. It allows you to define position of resulting ticket number, plus when someone needs some custom ticket number suffix, this can be done too. Please see tests for details.