Hi committers and future committers,

Please be careful when merging PRs.  Github's default behavior [1] of
composing the commit message may not be the best for our purposes.

1. If the PR has a single commit, Github defaults to using the
commit's message instead of the PR title.  Jira ID might be missing,
and the message may be outdated compared to the PR title.

Some examples:

9c6cd4b93e Changed snapshotId to UUID (#4848)
307481512c Fix problem with Performance metric preventing OM taking
snapshot. (#4734)
5657009a3d Data Rendering code on SCM UI (#4608)
53d8fe0e57 update readme (#4535)
9fa04a8f7b close db connection (#4366)

2. If the PR has multiple commits, Github uses the PR title, but also
adds each commit's title in a list.  This can be edited in the
"extended description" box when merging.  Usually these sub-titles are
useless for git history in the long term.  Nobody cares that
checkstyle errors were fixed, review comments addressed, or that there
were 5 commits with identical messages.  On the other hand, they make
`git show` and `git log` more clunky.  Please make sure to remove
these unnecessary details.

Some examples:
 * 
https://github.com/apache/ozone/commit/ce418581a8b4533a47de741d543072903562a4c6
 * 
https://github.com/apache/ozone/commit/9e44b503af1256f3f9a3ca91bce9d20331d2acf1
 * 
https://github.com/apache/ozone/commit/5a6865fb2c24388b10adedd30f2f24657ca1be2c
 * 
https://github.com/apache/ozone/commit/beec17828524cb53ccf496e23f9e0cb93b3cf7a0
 * 
https://github.com/apache/ozone/commit/8254f7340a0135c3229282c73197d1b4e69b155b

3. Some PRs have commits from multiple authors, which is reflected in
the extended commit message as "Co-authored-by: ...".  This is an
important piece of information to keep, if the contribution is
significant.  There are at least two cases when co-author information
should definitely be removed, though:

 * same person using multiple email addresses
 * empty commits sometimes used to trigger CI

thanks,
Attila

[1] 
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges#merge-message-for-a-squash-merge

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@ozone.apache.org
For additional commands, e-mail: dev-h...@ozone.apache.org

Reply via email to