smarkets / marge-bot

A merge-bot for GitLab
BSD 3-Clause "New" or "Revised" License
693 stars 136 forks source link

Feature request: Make it possible to use marge-bot with Encourage/Require squash commits when merging #333

Open perlun opened 2 years ago

perlun commented 2 years ago

At the moment, when one of the following options are enabled in the GitLab project settings:

image

...Marge-bot is unable to handle the MR. This is the error generated:

I couldn't merge this branch: Sorry, merging requests marked as auto-squash would ruin my commit tagging!

The main reason why we have Encourage squash enabled is to avoid meaningless "Applied n suggestions" commits slipping into our master branch. With the Encourage squash setting, we can retain a cleaner commit history. (We use a rebase-based workflow with no merge commits in the master branch.)

Now, it is of course possible to uncheck the Squash commits when merge request is accepted setting for an MR before assigning it to the Marge-bot used, but naturally, this significantly hampers the usefulness of Marge-bot unfortunately.

So my question would be:

  1. Are there any ways around this with the current version of Marge-bot as it stands?
  2. If not, are there any plans to make this possible sometime in the reasonably near future?

Semi-related issue: #152

insider89 commented 2 years ago

Does it plan to be implemented in the near future?