Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce squash merge #70

Open
pavel-mikula-sonarsource opened this issue Aug 10, 2023 · 0 comments
Open

Enforce squash merge #70

pavel-mikula-sonarsource opened this issue Aug 10, 2023 · 0 comments
Labels
New feature New action

Comments

@pavel-mikula-sonarsource
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New feature New action
Projects
None yet
Development

No branches or pull requests

1 participant