-
Notifications
You must be signed in to change notification settings - Fork 63
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
Support for multiple JIRA issue per commit #52
Comments
Hi! How would you expect the behaviour of the tool to work? Should the user be able to input multiple JIRA tickets in one commit? How would you want the commit to look like? |
Hi @VTrngNghia , In Jira for example, I understand that you could relate such tickets with multiple ones internally. But in the end, when opening a PR and commit, you will do so towards a single ticket. Maybe you could use such Jira feature instead? |
It's possible, even if not very common, that a single code change could simultaneously fix 2 separate issues/bugs. In such case a message in the form of "fix: JIRA-123 JIRA-456 Fix these bugs..." could be helpful |
I am curious how often that happens. If it happens in 10% of the commits it makes sense to build in, but if it only happens in 0.1% of the commits it might make sense to not support it. And in that case, write a manual message. Every feature is a tradeoff both in terms of maintenance and in terms of adding additional steps to the users. This step could be enabled with config so that it doesn't bother most users. But I wonder if it's very useful to ever have it. If you would need the feature once a month, and the rest of the time the feature adds a more complex UX, I don't think it should be used. Do you often have commits that solve multiple tickets? |
This should absolutely be allowed. You can even see it in the visual example for a competing plugin: https://github.com/commitizen/cz-jira-smart-commit/blob/master/other/screenshot.png |
Would it be enough to remove the validation regex in the prompt |
For simplicity, you could keep the current validation logic for Warning only, instead of Blocking invalid issues. |
I am not sure if I fully understand but I interpret your suggestion like this:
I don't think that should be the default behaviour. The blocking behaviour is a feature and I think the plugin would be worse without the blocking behaviour. If we don't block and the user puts in something that's incorrect, then they have no way of correcting it. They would have to abort the commit and try it again. The warning doesn't help much in that case. To me, it makes more sense to add an option that disables the formatting check so that users like you can write whatever issues you want. What are your thoughts about that? |
Would you be against adding support for entering multiple issues in the prompt separated by a space? Something like |
Regex currently only allows 1 JIRA issue per commit. Sometimes one commit may affect multiple issues.
Even though it's recommended to keep commits atomic, commits with multiple issues should still available as an option, maybe with a strong warning.
The text was updated successfully, but these errors were encountered: