User-specified template file instead of interactive dialog
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 101
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
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-identifier template-name
template-version-identifier template-version
commit-identifier hashrange (first hash or dots - last hash or dots)
block-identifier expression; text for user; (amount lines)
optional definitions for expression
default-user space
...
block-identifier expression; text for user; (amount of lines)
(default-user space)
(default-user space)
(default-user space)
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 like
template bugs
version 0.0.1
commits [initialhash - ..]
fix(scope): #issuenr;; (1 lines)
freetext; long description, additional informations, etc; ([0-x] lines)
key: #value; fixed and closed issues; ([1-x] lines)
key isof {Fixes, Closes, PR-Close}
Comma-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)
#fix(scope): #issuenr;; (1 lines)
# freetext; long description, additional informations, etc; ([0-x] lines)
#key: #value; fixed and closed issues; ([1-x] lines)
#key isof {Fixes, Closes, PR-Close}
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing interactive commit-message flow and the proposed .conv_commit template format in this issue. Clarify the grammar, validation, rebasing behavior, and CI integration before implementation; done should include an agreed template format and working validation of generated conventional commit messages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100