This can be auto-enforced from Github settings -
https://github.com/apache/hbase/settings

The options under "Merge button" let you select any of
1. Allow merge commits - Add all commits from the head branch to the base
branch with a merge commit.
2. Allow squash merging - Combine all commits from the head branch into a
single commit in the base branch.
3. Allow rebase merging - Add all commits from the head branch onto the
base branch individually.

To enforce, only option 2 should be selected.

-
zodvik

On Wed, Apr 24, 2019 at 12:29 AM Peter Somogyi <[email protected]> wrote:

> Some clarification to my previous email after reading the reply from Sean.
> I meant to squash multiple commits into a single one when the pull request
> touches a single JIRA.
>
> As an example this could be submitted using squash and merge:
> Pull Request: HBASE-XXXX
> Commit 1: HBASE-XXXX
> Commit 2: Additional test case
> Commit 3: Fix checkstyle issue
>
> On Tue, Apr 23, 2019 at 8:37 PM Sean Busbey <[email protected]> wrote:
>
> > Yes. either of the bottom two there would be fine, depending on the PR.
> >
> > If it's all for a single JIRA, I'd personally prefer the middle
> > "Squash and merge" option with an appropriately re-written commit
> > message.
> >
> > If the PR is covering 3 JIRAs together for some reason, then the last
> > option there, "rebase and merge" is what I'd personally prefer.
> >
> > /me shakes fist at overloaded use of "merge" to mean "merge commit"
> > and "accept this PR".
> >
> > On Tue, Apr 23, 2019 at 12:59 PM Stack <[email protected]> wrote:
> > >
> > > Use this link instead
> > >
> >
> https://drive.google.com/file/d/1Rd5tHjEu5XxJaRikcg6oG6MDceJ4GwTs/view?usp=sharing
> > >
> > > On Tue, Apr 23, 2019 at 10:38 AM Stack <[email protected]> wrote:
> > >
> > > > To be clear, you mean the last option here Sean?
> > https://ibb.co/8KrFkBq
> > > > S
> > > >
> > > > On Tue, Apr 23, 2019 at 7:32 AM Sean Busbey <[email protected]>
> wrote:
> > > >
> > > >> Folks,
> > > >>
> > > >> Looking at history for the current master branch, we had several PRs
> > > >> accepted over the last week where the committer used the "merge
> > > >> commit" option. As a reminder, previous consensus was that we would
> > > >> avoid this since it makes the history harder to follow.
> > > >>
> > > >> Please ensure you are selecting either "rebase commits" or "squash
> > > >> commits" when accepting a PR.
> > > >>
> > > >> I have filed INFRA-18264 to disable the merge commit option.
> > > >>
> > > >
> >
>

Reply via email to