Earlier quoted context omitted.
On come on, this entire "spec" can be summarized in two sentences. It can be validated with a 13 character regex. I share some of your sentiment though: I feel like the biggest reason to enforce a style like this is not for "machine readable commit messages" (I mean, why? ), but to encourage people to split refactors and features in separate commits. This makes it easier to understand what's going on later. I think t…
> Why? The machine-readable part is useful for generating changelogs (eg. broken out by type) or implementing semver (eg. detecting breaking changes).
Conventional Commits: A specification for structured commit messages
61–70 of 99 posts
Re: Conventional Commits: A specification for structured commit messages
#62Re: Conventional Commits: A specification for structured commit messages
#63Earlier quoted context omitted.
> Why? The machine-readable part is useful for generating changelogs (eg. broken out by type) or implementing semver (eg. detecting breaking changes).
but isn't it an antipattern to generate change-logs from commit subject lines?
Re: Conventional Commits: A specification for structured commit messages
#64Earlier quoted context omitted.
You ever play or work on a game? Changelogs are a big deal over there. Automatically collecting them would be highly valuable.
Do this from your JIRA (or equivalent) tickets then, you already have user oriented descriptions there. you can easily collect all tasks and bug tickets done during a sprint and generate a changelog. Though in practice I would expect someone to cleanup by hand.
It's usual to include the ticket id in the commit or PR so you can pull it from logs at build time and have a canonical list. Then grab the info to include from the ticketing system.
Re: Conventional Commits: A specification for structured commit messages
#65Commit messages are just that - an additional communication tool. As long as any format helps keep the understanding within a team clear with a minimum of overhead, so be it. After all the commit message is secondary to the actual code committed. I'm sure everyone can share an episode when a nicely worded commit had to be followed up with an ugly 'Fix a typo' message. The most practical convention is the one that's a…
There is `git commit --fixup` and `git rebase -i --autosquash` for that ;)
Re: Conventional Commits: A specification for structured commit messages
#66Re: Conventional Commits: A specification for structured commit messages
#67Earlier quoted context omitted.
but isn't it an antipattern to generate change-logs from commit subject lines?
Of course not. How else would you do it?
Patch descriptions are for developers, not for users -- aside from the fact they're the wrong granularity (no user cares if it took 20 patches and three PR cycles to implement a feature), they should contain details and justification that are only useful for future debugging or for review purposes (which users also don't care about). And if you have a bugfix for a previously-merged patch that hasn't yet been released, why would you include the bugfix in the changelog?
Yes, with the right format and discipline you could generate reasonable changelogs from your commit logs -- but at that point it's so much easier to just keep a CHANGELOG.md.
Re: Conventional Commits: A specification for structured commit messages
#68Re: Conventional Commits: A specification for structured commit messages
#69Earlier quoted context omitted.
I agree that full sentences (e.g. like Email subjects or blog post titles) are better. Tagging commits with feature/bug/etc is not particularly useful, as more often than not the line between feature, bug, etc is blurry. At times it can also be unclear what tag to use, leading to arbitrary choices. For example: is a performance improvement a feature, or a bug fix? The tags also add no value when reading commit messag…
Surely the most important part of a commit is the code committed, not the accompanying message .
The code is what actually gets run, sure, but good code with bad or misleading documentation can cause trouble later on. Commit messages are documentation.
Re: Conventional Commits: A specification for structured commit messages
#70Earlier quoted context omitted.
That seems inaccurate, it looks more like fix: feat: are both potentially patch level while fix!: feat!: breaking change: and breaking change!: indicate major changes... possibly? Ouf I think the commit is just absolutely the wrong level to encode this at - I much prefer ticket level encoding of this information.
I was explaining how standard-version [0] works. Conventional Commits homepage doesn't mention anything about the '!' syntax. [1] I'm unsure if you're suggesting that's how you think it should work, or how it actually works. I haven't ever tried using the '!' syntax, so I can't say for certain. In terms of release management, it makes configuring CI jobs simpler with one less parameter. If you automatically release m…
"or appends a ! after the type/scope, introduces a breaking API change"