You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes a PR is ready to merge, but you want to wait for the tests to pass, it would be nice to have a button that said "Merge when tests pass", if pressed, we should poll the button for the class that makes it green and just press it when it turns green.
I can make a PR if you like the idea, otherwise close and I'll make it a bookmarklet instead.
Reacted by fregante, Jonas Gierer, Ian MacLeod, Pierre de La Morinerie, Wilhelm Eklund, Sefi Eini, tomasyany, Aron Adler, Ethan Jiang, Kathryn Newbould and 47 more
Reacted by Kamil, Tony Gentilcore, Adam Aiken, Jordin, Tharak Krishnan, Micael F. Grilo and Harry Hopkinson
I like it, I always find myself in that situation. I guess we should also add a onbeforeunload blocker so one doesn't close the tab before it's "done"
But also sometimes I want to merge and leave a comment after. Should that be handled automatically too?
Perhaps a notification of some kind would be more flexible (although not as automated)? e.g. The orange status indicator has a bell next to it and by clicking it you'll be notified of whatever result.
Reacted by Albin Ekblom, Harry Dobrev, Sindre Sorhus and Tony Gentilcore
You would select 'When tests pass', click 'Squash and merge' (or whatever option you prefer) and fill in the merge details and confirm as usual. (This would be a duplicated version of the native GitHub form). RGH would then watch for the checks to turn green and trigger the click event on the actual merge button.
Reacted by Justin D. Harris, Tony Gentilcore, Oliver Tappin, Alex Sorokoletov, Casey Rodarmor, Maximilian Roos, Ariel Faigon, Min Xu and Alexey Pyshnenko
I think we should keep it simple and not implement some of the suggestions. - i.e. closing the window is not needed, better to leave it open for confirmation and acknowledgement when you return to it back later. Comments I think should be made custom and saved replies help there to save time. As a rule of thumb, we should abide the rule of least surprise.
If we later do #908, we can combine that in the form when you confirm the merging. However, we can implement #865 without that for now.
It's important to note that sometimes the button and the form are disabled when the tests haven't passed if the required checks are enabled for the base branch. You could have an admin checkbox to override that or not depending on whether you're an admin or whether these checks are enforced for admins. That said, if the button is disabled and the commit status is yellow, we don't know if it will be enabled once the tests pass. My preference, in that case, would be to still be able to say to merge once the tests pass, but we just won't do anything if the form is not enabled when the commit status is green.
I prefer a single checkbox for “Wait for tests to pass”
Indeed, I don't see why it should be a duplicated form.
I guess we should also add a onbeforeunload blocker so one doesn't close the tab before it's "done"
👍
Re the UI, I usually have required checks configured and I'm an admin with checks not enforced for admins. GitHub puts the checkbox to make use of your admin privileges and merge anyway in the form below the text area.
The expected place to put this in my case would be around that checkbox below the text area above the merge button in the merge form.
Activity
fregante commentedon Dec 11, 2017
I like it, I always find myself in that situation. I guess we should also add a
onbeforeunloadblocker so one doesn't close the tab before it's "done"But also sometimes I want to merge and leave a comment after. Should that be handled automatically too?
Perhaps a notification of some kind would be more flexible (although not as automated)? e.g. The orange status indicator has a bell next to it and by clicking it you'll be notified of whatever result.
jgierer12 commentedon Dec 27, 2017
How about something like this:

You would select 'When tests pass', click 'Squash and merge' (or whatever option you prefer) and fill in the merge details and confirm as usual. (This would be a duplicated version of the native GitHub form). RGH would then watch for the checks to turn green and trigger the click event on the actual merge button.
fregante commentedon Dec 27, 2017
Question: why would it be a duplicated form?
I prefer a single checkbox for “Wait for tests to pass”
But then again: “thank you” comment? Branch deletion?
How about we show more checkboxes when tests are running:
$ say hurray!😜Perhaps we can find a more refined UI
hkdobrev commentedon Dec 27, 2017
I think we should keep it simple and not implement some of the suggestions. - i.e. closing the window is not needed, better to leave it open for confirmation and acknowledgement when you return to it back later. Comments I think should be made custom and saved replies help there to save time. As a rule of thumb, we should abide the rule of least surprise.
If we later do #908, we can combine that in the form when you confirm the merging. However, we can implement #865 without that for now.
It's important to note that sometimes the button and the form are disabled when the tests haven't passed if the required checks are enabled for the base branch. You could have an admin checkbox to override that or not depending on whether you're an admin or whether these checks are enforced for admins. That said, if the button is disabled and the commit status is yellow, we don't know if it will be enabled once the tests pass. My preference, in that case, would be to still be able to say to merge once the tests pass, but we just won't do anything if the form is not enabled when the commit status is green.
@bfred-it What do you imagine?
Indeed, I don't see why it should be a duplicated form.
👍
Re the UI, I usually have required checks configured and I'm an admin with checks not enforced for admins. GitHub puts the checkbox to make use of your admin privileges and merge anyway in the form below the text area.
The expected place to put this in my case would be around that checkbox below the text area above the merge button in the merge form.
fregante commentedon Dec 27, 2017
Yeah that was tongue in cheek
Of course, I meant "send whatever message you wrote". It could actually be a separate-but-similar checkbox next to "Comment", like:
Comment | ☑️ Wait for test to pass
Sounds about right. The only problem in that case is that the user cannot click the disabled button, so a simple checkbox won't do.
I mean a single checkbox literally with the label “Wait for tests to pass”, where @jgierer12 placed the radio boxes.
I'm lost. Screenshot/mockup?
samuelcolvin commentedon Aug 4, 2022
This is fixed https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request