Skip to content
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 Request] Optional prompt to use exclamation (!) to denote breaking change #38

Closed
sitiom opened this issue Jun 22, 2022 · 33 comments
Assignees
Labels
enhancement New feature or request next version Plan for next version

Comments

@sitiom
Copy link

sitiom commented Jun 22, 2022

💭 Describe the feature

See Conventional Commits examples:
image

💡 Proposed Solution

An option to denote an exclamation mark

@sitiom sitiom added the enhancement New feature or request label Jun 22, 2022
@Zhengqbbb
Copy link
Owner

Zhengqbbb commented Jun 22, 2022

Received, thanks for the let me know more, you can look at this option
https://cz-git.qbenben.com/config/show.html#typesappend
See if it can solve your needs first

@Zhengqbbb
Copy link
Owner

I have been following this option, you can check out this tweet.
Let me know if it solves your problem

https://twitter.com/antfu7/status/1536301374748913666

@sitiom
Copy link
Author

sitiom commented Jun 22, 2022

Received, thanks for the let me know more, you can look at this option cz-git.qbenben.com/config/show.html#typesappend See if it can solve your needs first

This just adds additional types in addition to the default ones. I want to be able to append an exclamation mark to every type (feat!:, chore!:, ci!:, ...).

I have been following this option, you can check out this tweet. Let me know if it solves your problem

twitter.com/antfu7/status/1536301374748913666

This one is for changelogs, not for Commitizen.

@Zhengqbbb
Copy link
Owner

Zhengqbbb commented Jun 22, 2022

In the next version I will add an environment variable for better use.
e.g:break=1 czIn this way, "!" mark will be added after all types.

What better opinion do you have?

@Zhengqbbb Zhengqbbb added the next version Plan for next version label Jun 22, 2022
@sitiom
Copy link
Author

sitiom commented Jun 22, 2022

I was thinking of an optional prompt "Would you like to prefix an exclamation (!) mark to denote a breaking change? (Yn)" right before the "List any BREAKING CHANGES" prompt.

@sitiom sitiom changed the title [Feature Request] Option to use exclamation (!) to denote breaking change [Feature Request] Optional prompt to use exclamation (!) to denote breaking change Jun 22, 2022
@Zhengqbbb
Copy link
Owner

I also need to consider that users who use commitlint will return false so mark is not provided by default.

I think there should be a configuration item to give prompt to cooperate with BREAKCHANGE

Environment variables are also prepared for no-config for anyway,
I will release cz-git cli in the next version
break=1 cz or
czg break

@sitiom
Copy link
Author

sitiom commented Jun 22, 2022

I also need to consider that users who use commitlint will return false so mark is not provided by default.

I'm using commitlint and using the exclamation mark works just fine.

@Zhengqbbb
Copy link
Owner

I also need to consider that users who use commitlint will return false so mark is not provided by default.

I'm using commitlint and using the exclamation mark works just fine.

great~ Maybe this feature needs more than cli.it will come soon

@Zhengqbbb
Copy link
Owner

@sitiom
I think I'm almost done.
you see if there is any problem

Use the environment variable Demo :
a

Can add options markBreakingChangeMode: true turn on the question of extra prompt:
demo:

a

Zhengqbbb added a commit that referenced this issue Jun 22, 2022
@sitiom
Copy link
Author

sitiom commented Jun 22, 2022

Looks good to me!

@Zhengqbbb
Copy link
Owner

Looks good to me!

I expect that I will a release on the weekend, of course I want the cli to go live together, I will give a notice at that time, thank you for your suggestion

Zhengqbbb added a commit that referenced this issue Jun 24, 2022
Zhengqbbb added a commit that referenced this issue Jun 24, 2022
…t mark `!` #39 (#38)

feat(cz-git): add `markBreakingChangeMode` options to add extra prompt mark `!`

it use exclamation (!) to denote breaking change
see: https://www.conventionalcommits.org/en/v1.0.0/#examples
@Zhengqbbb
Copy link
Owner

Zhengqbbb commented Jun 25, 2022

@sitiom
The latest version 🌟(v1.3.6)🌟 should be resolve this issue request , please have a try. 💪
👀 Let me know if there are still any issues. Thanks for you work! 🎉

Guide see: https://cz-git.qbenben.com/recipes/breakingchange.html

@sitiom
Copy link
Author

sitiom commented Jun 25, 2022

Thanks, it works as intended so far.

@sitiom
Copy link
Author

sitiom commented Jun 25, 2022

@Zhengqbbb Wait, if I input "no" in the breaking change prompt it won't ask for a breaking change footer. Regardless, it should still ask for a breaking change description because it is possible to omit the ! if a breaking change footer exists (and vice versa).

@Zhengqbbb
Copy link
Owner

Zhengqbbb commented Jun 25, 2022

I didn't want to add another question, but that said, it should be added and matched with the allowBreakingChanges options.

But what I'm not sure about is if this would be too verbose

@Zhengqbbb
Copy link
Owner

This is how I see it, if this mode is turned on, if you choose no, then it means that there is no BREAKINGCHANGE

@sitiom
Copy link
Author

sitiom commented Jun 25, 2022

Not necessarily, you can omit the ! when there is a BREAKING CHANGE: footer and vice versa. See the examples on the CC site:

Commit message with description and breaking change footer

feat: allow provided config object to extend other configs

BREAKING CHANGE: `extends` key in config file is now used for extending other config files

Commit message with ! to draw attention to breaking change

feat!: send an email to the customer when a product is shipped

Commit message with both ! and BREAKING CHANGE footer

chore!: drop support for Node 6

BREAKING CHANGE: use JavaScript features not available in Node 6.

@Zhengqbbb Zhengqbbb reopened this Jun 25, 2022
@sitiom
Copy link
Author

sitiom commented Jun 25, 2022

I just thought of it now; since both options can be omitted from each other, shouldn't the ! prompt be already there by default, and no config/environment var is needed?

@Zhengqbbb
Copy link
Owner

wait five mins

@Zhengqbbb
Copy link
Owner

I just thought of it now; since both options can be omitted from each other, shouldn't the ! prompt be already there by default, and no config/environment var is needed?

NO, this will lose the no-config convenience, and you ignore a point that only feat fix will have this question by default

@sitiom
Copy link
Author

sitiom commented Jun 25, 2022

I just thought of it now; since both options can be omitted from each other, shouldn't the ! prompt be already there by default, and no config/environment var is needed?

Oh, Yeah, except those not defined in allowBreakingChanges of course.

@Zhengqbbb
Copy link
Owner

The latest version 🌟(v1.3.7)🌟 should be resolve this issue request , please have a try. 💪
👀 Let me know if there are still any issues. Thanks for you work! 🎉
Thanks again for your advice!!!

@Zhengqbbb
Copy link
Owner

Zhengqbbb commented Jun 25, 2022

BTW you can try npx czg in your project 😁😁😁
It will be awsome

@sitiom
Copy link
Author

sitiom commented Jun 25, 2022

The latest version 🌟(v1.3.7)🌟 should be resolve this issue request , please have a try. 💪 👀 Let me know if there are still any issues. Thanks for you work! 🎉 Thanks again for your advice!!!

It works as intended now, thanks!

BTW you can try npx czg in your project 😁😁😁 It will be awsome

Thanks. I'm used to having a git cz alias, though. Can you add it for that one?

@Zhengqbbb
Copy link
Owner

Can you add it for that one?

I will say no. I'm also a shell developer, I know this behavior is very disruptive to the user's environment. it's up to the user to decide and create.
😇 Thx u support

@sitiom
Copy link
Author

sitiom commented Jun 25, 2022

@Zhengqbbb the issue seems to still haven't been fixed in czg:
image

@Zhengqbbb
Copy link
Owner

Zhengqbbb commented Jun 25, 2022

Is there any operation steps, It fine on my env

https://cz-git.qbenben.com/cli/break.html

@sitiom
Copy link
Author

sitiom commented Jun 25, 2022

There's still a break mode in czg? It doesn't match the behavior in the adapter?

@Zhengqbbb
Copy link
Owner

Zhengqbbb commented Jun 25, 2022

There's still a break mode in czg? It doesn't match the behavior in the adapter?

You mean, BREAKINGCHANGE footer is not appearing, Emmm allowBreakingChanges is a problem, I will fix it next week

break mode specifically refers to the quick addition of ! ,that all

@sitiom
Copy link
Author

sitiom commented Jun 25, 2022

Oh ok, it seems that I have misunderstood it, sorry. Just ignore my previous comments, everything is working fine.

@Zhengqbbb
Copy link
Owner

Oh ok, it seems that I have misunderstood it, sorry. Just ignore my previous comments, everything is working fine.

Use the CLI a lot and you'll build muscle memory and experience the feeling of being fast and simple! ❤️

@Zhengqbbb
Copy link
Owner

Thanks. I'm used to having a git cz alias, though. Can you add it for that one?

Through the study of this article, I have changed my previous idea and added a command line entry git-czg, I will release a version v1.3.10 on the weekend, then you can use git czg to start CLI

Git automatically resolved subcommands from executables in the PATH that follow the naming convention git-. These subcommands can be executed with git .

🤗

@sitiom
Copy link
Author

sitiom commented Jul 23, 2022

Interesting, that's why git recognizes git cz 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request next version Plan for next version
Projects
None yet
Development

No branches or pull requests

2 participants