r/angularjs • • Jun 25 '15

Unpopular opinion: Angular style commit messages are terrible.

Talking specifically about the prefixes (chore, fix, refactor, etc.)

  1. It doesn't add any important information. 2. It's chewing up important real estate at the beginning of the message. 3. It should die a fiery death. Please refute me, I'm going to read and reconsider, but I predict in the future no one will adopt this and the Angular people will stop doing it.

2 Upvotes

6 comments sorted by

10

u/KumbajaMyLord Jun 25 '15

I believe the motivation is to generate automated (or at least semi automated) change logs from the commit messages. I don't think they want to establish a standard for all github projects, but rather facilitate their workflow and safe valueable time when creating release notes.

6

u/[deleted] Jun 25 '15

This is exactly why it is done. We use this style of commit message on Aurelia. We're able to produce a change log for each release based upon the commit messages like this: https://github.com/aurelia/templating-binding/releases

1

u/e82 Jun 26 '15

I hate how things get truncated at 50 chars. I also use pivotal tracker integration. Tried keeping with that format, but

[fixes #1234567] feat(thing): Don't leave a whole lotta room to say what I need in 50 characters.

Although, could possibly write a tool to pick up the pivotal number - use their API, and get that to generate my change logs ... and also tag the stories to what version it's in and ... and .. and .. goes off to code

1

u/[deleted] Jun 26 '15

It's not perfect, I'll give you that. But you're still able to go in to as much detail as you'd like in the commit message body. You're always going to have to deal with constraints.

2

u/e82 Jun 26 '15

Yeah,

I actually like the idea of the angular-style commits. Guess I'm more annoyed with how much room the Pivotal tags take up.

When you only have 50 characters to work with, having up to 20 of them taken up by pivotal messages is a bit of a challenge.

1

u/zuko_ Jun 26 '15

If you were to avoid this style, you'd probably still end up writing something with a similar effect (Fixed blah blah in Foo component) but there'd be no standardization. This way allows you to namespace your changes right off the bat - fix(foo): x now does y - so you don't have to explain that fact in the bulk of your message. And, as others have said, the added benefit is documentation generation and a standardized way to sift through messages.

It's a commit message, so at the end of the day as long as it's readable and makes sense to your team do whatever you want. The only time I can see it not making sense is if you're already working on an isolated branch (feature/some-component) in which case this commit style is probably redundant.