Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Disable green merge button for a specific repository #5

Open
isaacs opened this issue Jun 4, 2013 · 159 comments
Open

Disable green merge button for a specific repository #5

isaacs opened this issue Jun 4, 2013 · 159 comments

Comments

@isaacs
Copy link
Owner

isaacs commented Jun 4, 2013

On joyent/node and isaacs/npm, we have a strict rule about not merging pull requests using the green "merge" button, because it creates excessive merge commits. (See additional discussion in #2.)

But the button is large, and inviting. It'd be nice to conditionally disable it per repository.

@aredridel

This comment has been minimized.

@silverjam
Copy link

+1 -- We've adopted the same rule on our team

@germanop

This comment has been minimized.

1 similar comment
@dutchchasman

This comment has been minimized.

@gnarf
Copy link

gnarf commented Sep 13, 2013

👍 from jQuery also. https://twitter.com/gnarf/status/378211055932936192

@patcon
Copy link

patcon commented Sep 13, 2013

Related: #88 "Allow pull requests to be rebased from the UI"

@mmb

This comment has been minimized.

8 similar comments
@jvennix-r7
Copy link

👍

@aheckmann
Copy link

+1

@tellnes
Copy link

tellnes commented Dec 10, 2013

👍

@vpv-gd
Copy link

vpv-gd commented Jan 15, 2014

👍

@ivantretyakov
Copy link

👍

@Rorick
Copy link

Rorick commented Jan 15, 2014

👍

@iaon
Copy link

iaon commented Jan 15, 2014

+1

@akatyshev
Copy link

+1

@donavon
Copy link

donavon commented Feb 10, 2014

👍 What if we say pretty please?

@mgamba

This comment has been minimized.

@patcon
Copy link

patcon commented Feb 11, 2014

Definitely overkill, but I wonder if it would be possible to use a service to create a webhook (new webhook implementation WHOOP!) so that whenever a PR is merged, it reverts by updating the head ref. I'm not 100% on git internals and whether this is how head references work. Also not sure how github would treat the PR anyhow

@lambdabaa

This comment has been minimized.

@juliemr
Copy link

juliemr commented May 20, 2014

+1 would also use this

@mirekkukla

This comment has been minimized.

5 similar comments
@sfitts
Copy link

sfitts commented Jun 5, 2014

+1

@btford
Copy link

btford commented Jul 8, 2014

+1

@rodyhaddad
Copy link

+1

@petebacondarwin
Copy link

+1

@matsko
Copy link

matsko commented Jul 8, 2014

+1

@matsko
Copy link

matsko commented Jul 8, 2014

That button is pure evil.

@caitp
Copy link

caitp commented Jul 9, 2014

(づ ̄ ³ ̄)づ:+1:

@pkozlowski-opensource
Copy link

+1 The other alternative is to have a setting per-repository where we could specify that the green-button would be only available for the fast-forward merges and pressing it would not create a merge commit. Still in projects with high traffic PRs fast-forward merges are rare...

@seanwalbran

This comment has been minimized.

@jimconner
Copy link

I just trained Adblock that the 'Confirm & Merge' button should not be displayed - This nicely solves the problem for me and stops me accidentally clicking it... and I can always disable adblock if I want the merge button to return - Hope this idea comes in useful to others.

@DVGeoffrey
Copy link

Almost the 3rd anniversary of this issue. +1!!!!!

@purpleidea

This comment has been minimized.

2 similar comments
@onlyhavecans
Copy link

+1

@tagrudev
Copy link

tagrudev commented Jun 8, 2016

+1

@shahp00ja
Copy link

shahp00ja commented Jul 11, 2016

+1 we do want it to have a hook kind of mechanism which can be switched on/off on demand to say enable or disable as per need.
Use Case 1: PR should be able to be merged only if the commit changes are approved which means dev peer review is done and its good to be candidate of release
Use Case 2 code-freeze for release testing is important and so we want to disable the Merge button for a particular repository -> particular branch let say master for certain period (off-course- few folks only should be able to do it may be by disabling the hook)
It looks doable using Status API but looking for a more straight forward solution

@nbougalis

This comment has been minimized.

@davesmith00000
Copy link

+!

@ghost

This comment has been minimized.

3 similar comments
@btcdrak
Copy link

btcdrak commented Aug 23, 2016

+1

@kilpatrick
Copy link

👍

@pancetta
Copy link

pancetta commented Oct 3, 2016

+1

@p00j4
Copy link

p00j4 commented Oct 3, 2016

Its easily doable now. Here is the solution
With latest release of github, it works out of the box now for this case

@akhalikov

This comment has been minimized.

1 similar comment
@rayalan
Copy link

rayalan commented May 5, 2017

+1

@JakeShirley
Copy link

+1 we strictly use a rebase work flow with out any merge nodes, so this would be great

@jfirebaugh
Copy link

For those that are +1'ing the issue and may not have seen this, the "Options" page in repository settings now has the following options:

image

I believe disallowing merge commits in favor of rebasing and fast-forward merges was the original reason for opening this issue, and it can be closed now that that's possible.

@purpleidea
Copy link

@jfirebaugh While this is great, it won't let you "uncheck" all three boxes, which would be great for preventing "yolo-style" click merging, and instead getting users to actually use the cli and/or test the patch themselves first :)

@Frikki
Copy link

Frikki commented Jun 9, 2017

Amazing this cannot be disabled completely!

@anicholls

This comment has been minimized.

@Tremelune
Copy link

Still an issue. I very much want to prevent anyone from using GitHub to merge, ever.

@sahellebusch
Copy link

Is this ever going to be addressed? Or should I start writing a chrome extension to remove it?

@6be709c0

This comment has been minimized.

@MarkSRobinson
Copy link

I've found one way to remove the green merge button.

I've setup Bors-NG as a commit queue. I then set the bors merge job as required/blocking in the Github config. The job doesn't run until a user types bors r+ and in the mean time they cannot use the green merge button because a required build is missing.

It works quite well to prevent people from hitting the big green button

@vdh
Copy link

vdh commented Feb 4, 2020

This wouldn't be a problem if GitHub didn't hardcode --no-ff into this button's default behaviour. If the --no-ff flag had an opt-out option in the repo settings, then at least the button would fast forward when a new commit isn't required, just like the default Git merge behaviour.

@martin-morin
Copy link

For our team, we would need to disable the merge button. Here is our process:

  1. Get the pull request approved
  2. Run the pull request on the build server for all sort of verifications (The goal is to maintain the production branch in a perfect state, without any issues)
  3. If the build server passes all the verifications, it triggers the merge to the production branch

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests