Commit Message Guideline

These guidelines are definitely good to have and I think we should codify them in our docs! One big problem we have today is clicking the merge button on GitHub defaults to a bad commit message which [RFC] Allow merging via PR comments should fix but would also be a workflow change. We can enforce some rules via automation, but getting people to change their behavior regarding these kind things is tricky.

With prescriptive rules like this they’re not really enforceable. For one lots of reviewers won’t follow a workflow outside their usual one (i.e. reviewing for commit language), and a review comment can be pretty costly, especially if the reviewer/author aren’t in the same time zone. Is it really worth it to incur this delay for something simple like a change in punctuation in the PR title? Alternatively, the onus could be entirely on the reviewer to edit the message as necessary to conform to the guidelines (but this makes reviewing harder).

I think the ones we can do automatically via the mergebot RFC is ensure:

  • there is at least one ‘tag’ in the title ([ci], microtvm, etc)
  • that the body is not empty

The commits on PRs should not have any bearing on the merged commit message (so no rules apply). They can be helpful for review, but the final message should be based on the PR title + PR body since that is where people usually consolidate the actual information (and it’s what GitHub surfaces by default, whereas you have to go digging for commits).