Comments (4)
@sirwindfield ping.
from git-cm.
Yes, you nailed it.
Conventional commits does not specify the body of keywords.
And I wanted to force the text for the user to be as short as possible for a MVP.
How do you want to proceed on this?
from git-cm.
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, feat
and fix
. In that case you'd have two templates, one that matches the feature and one the fix commits. Each has metadata that can be used to match it against the right commits (the hash range). The tool would then warn the user if a commit has a matching template but is not formatted accordingly.
Given the fix example you gave, I understood it that fix templates would be allowed to only have footers of type Fixes, Closes, PR-Close
. Everything else would be interpreted as false and the tool could return an error/abort/whatever. The body has no restrictions set to it, but the description does. It is only allowed to be one line long. So this would fail to lint correctly:
fix(scope): this is a message
split into two lines
Is that correct? :)
from git-cm.
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.
from git-cm.
Related Issues (20)
- Build failing HOT 1
- Add editor mode HOT 1
- Configurable editor mode templates HOT 1
- Lines should be wrapped around a specific number of words HOT 2
- Support shell completions with `clap_complete`
- Check for valid git repository at a path before commencing with the dialog
- [Feature Request] Support config through a unified file HOT 5
- auto-update binary
- "git cm" fails if invoked from a directory other than git repository root HOT 2
- Repository with no staged changes does still produce a commit hash HOT 3
- Move to @conventional-commits-rs HOT 3
- CTRL+c make my cursor disappear HOT 3
- Rename master to main HOT 1
- The image that links to the docs on readme is broken HOT 1
- Add option to open a text editor for the commit's description HOT 5
- Allow per-repo installation HOT 1
- Could we have a better line editor? HOT 5
- Passing `-e` and saying yes to the issue reference question blocks text input but opens editor
- The binary executable depends on source code to run HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git-cm.