Skip to content

Enforce squash merge #70

@pavel-mikula-sonarsource

Description

We need an action or hook that will block merging of a PR after "Rebase and merge" button was clicked and PR was not from a feature/* branch.

Equally, when a feature branch is merged, it should not be possible to Squash the commits.

Why?

Normally, we use "Squash and merge" for every single PR.
When we need to merge a feature branch, we need to use "Rebase and merge" button.
Unfortunately, GitHub UI will remember that option for the user who merged the feature branch.
And with the very next PR, it is easy to miss the fact that user needs to change to "Squash and merge" again.

Having that, the commit history with "Review 2" and similar commits that were not intended for the master branch will get merged

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions