gerrit: improve revert commit message template, if possible #30530
When using Gerrit UI to create a revert of a CL, it populates the commit message with the following template:
In most contexts of the Go project, we refer to changes by the CL number or a shortlink of the form
If possible, we should consider changing the template to be:
Or perhaps the
Revert CLs are generally created in situations that involve more time pressure and stress compared to normal CLs, so it's less reliable for us to depend on people to remember to do this manually, or to reference documentation like at https://golang.org/wiki/CommitMessage. It's better to adjust the template.
I'm not very familiar with the configurability of our Gerrit instance and whether this is possible. /cc @andybons @bradfitz From looking at its source at https://gerrit.googlesource.com/gerrit/+/v2.16.6/polygerrit-ui/app/elements/change/gr-confirm-revert-dialog/gr-confirm-revert-dialog.js#50, it may be the case that this is not a configurable Gerrit feature, and so this may be blocked on a feature request for Gerrit.
This issue is to investigate whether this is possible, and whether we agree it's a good idea. /cc @ianlancetaylor
The text was updated successfully, but these errors were encountered:
As an idea to consider, if we can't easily control the template Gerrit UI uses, another approach could be to use our own infrastructure (maintner/gopherbot/gerritbot) to detect when a revert CL with that template is created, and have it automatically update the commit message to our preferred template.
However, this approach may involve significantly more work, and may not be reliable or have unintended side-effects.