-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
User-specified template file instead of interactive dialog #39
Comments
@sirwindfield ping. |
Thanks for the ping, I did actually forget to answer :) So after reading this a couple of times I think I got it. Your idea sounds more like something that is useful in cases where the template does change during the lifecycle of the application or is introduced into one that did not rely on a commit message convention. Especially by declaring the commit hash range, templates can be applied to different ranges of the (pre-existing) commits inside a repository. The way I understood it is that you can define templates for various types of commits, let's just go with the two mandatory ones, Given the fix example you gave, I understood it that fix templates would be allowed to only have footers of type
Is that correct? :) |
Yes, you nailed it. And I wanted to force the text for the user to be as short as possible for a MVP. |
It sounds like a neat feature to be honest and I like it! I will probably implement something along the lines of this. I am currently cleaning up all the code that I want to publish to @conventional-commits-rs before I proceed on working on this program :) I currently want to push and publish all the necessary crates to work inside the conventional commits ecosystem for Rust. After that, I will go back and improve this crate as well. In it's current state, it works with conventional commits and that was my main goal :) That being said, I need to keep somewhere track on stuff that might be useful inside this tool. This is, however, a feature I am looking into implementing. I am not sure though if I will put it in here or into https://github.com/conventional-commits-rs/commitlint. |
I am writing regarding the reddit conversation we had and will shortly recap the idea to reduce user-time on filling the commit message. Sorry for the long post, but I wanted to make sure what I do mean. This feature would include writing a hopefully very simple grammar to check the templates for conventional commits conformance.
The template then can be checked locally and by the CI against commit messages. Please let me know what you think of the idea and what your practical experience is with conventional commits.
The idea
Have a template to create the commit "popup as fulltext" in
.conv_commit
. The idea is to use parse prefix and postfix to check conformance to the content of the commit message with the following lines (as block).The overall structure is (pseudocode later to be replaced by grammar file):
template-version here defines the version of
git-scm
the template was created with. Incompatibilities/CVEs etc then can be checked at startup.One instance of such template, we call it
bug.convcom
, could look likeComma-separated values and line-separated keys are implicit knowledge, so not part of the template. Annoyingly hard would be the parsing of expressions
key isof {Fixes, Closes, PR-Close}
, so saving these as part of the program could be easier for maintenance.The user would see the following, (I do assume we can somehow make sure the commit is rebased against master, so the according script-template will be executed or an error message returned)
The empty space is to indicate, that freetext is no keyword. Aside of that the user should only care about the template, when issues occur.
The text was updated successfully, but these errors were encountered: