TLDR: Just put the fucking Issue ID in the commit message, you asshat!
I keep reading about Conventional Commits, and I think they are somewhat contrived and over complicate a simple requirement of commits: What context was a change made for. As we all know, information is somewhat useless without context. And I feel the same what about commit messages. And the best context in a commit message a link to the original Ticket in the Issue Tracking system. Most Issue Tracking systems support linking to the SCM, so that you can have a bi-directional link. If you look at an issue you can have a list of SCM changes done for that issue. For example, here is a JIRA issue showing what code change was done for it:
And if I look into my SCM I can see the JIRA issues that were used to make changes:
And the way to do this is to always have the Issue ID in the commit message. That's it. JIRA has this feature, so does Git Hub. That's all you need to do. Every commit message should have the Issue ID in it. So you can follow back as to why a change was done. That's the context. It's pretty useless to me if I look into the SCM history and see shit like:
It's great that a feature was added, but why was it added? Who requested it? etc etc...
I keep reading about Conventional Commits, and I think they are somewhat contrived and over complicate a simple requirement of commits: What context was a change made for. As we all know, information is somewhat useless without context. And I feel the same what about commit messages. And the best context in a commit message a link to the original Ticket in the Issue Tracking system. Most Issue Tracking systems support linking to the SCM, so that you can have a bi-directional link. If you look at an issue you can have a list of SCM changes done for that issue. For example, here is a JIRA issue showing what code change was done for it:
And if I look into my SCM I can see the JIRA issues that were used to make changes:
And the way to do this is to always have the Issue ID in the commit message. That's it. JIRA has this feature, so does Git Hub. That's all you need to do. Every commit message should have the Issue ID in it. So you can follow back as to why a change was done. That's the context. It's pretty useless to me if I look into the SCM history and see shit like:
feat: allow provided config object to extend other configs
It's great that a feature was added, but why was it added? Who requested it? etc etc...
That's only for your use case. Conventional commits are useful for other reason too, you asshat! For example, they can automatically generate the appropriate version bump for the next publish. Plus some people on small projects don't need issues for every commit, that's just a waste of time in certain cases, you asshat!
ReplyDeleteIt’s easier to aggregate discussion on an issue than a commit with most SCMs because you can discuss the feature that a commit is associated with before it’s implemented and after.
DeleteIf there’s no issue associated with the commit, the commit is probably not that important, the project is probably not that important or potentially you shouldn’t be doing it depending on your team’s workflow.