Hi Attila,
Thanx for flagging this, makes sense to me. Following the Github Doc that
you shared, reached here [1]

The 4th point here:
--->
Optionally, under Allow squash merging, select the dropdown menu, then
click the format of the default squash commit message presented to
contributors when merging.
The default message uses the commit title and message if the pull request
contains only 1 commit, or the pull request title and list of commits if
the pull request contains 2 or more commits. You can also choose to use
just the pull request title, the pull request title and commit details, or
the pull request title and description.
<---

Can we explore this? And ask Infra to change the default to just the PR
title? AFAIK we already have a github action which checks the PR title, so
we should be sorted, if we get this done?

Optionally, A lot of projects have Wiki's for "How To Commit" which
outlines basic stuff for committers, example [2], maybe we can also explore
having one for ozone...

-Ayush


[1]
https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests
[2]
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=27362108

On Sat, 10 Jun 2023 at 15:04, Attila Doroszlai <adorosz...@apache.org>
wrote:

> 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