Skip to content

Add auto merge after tests pass button #865

Closed

Description

@albinekb

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.

Activity

  1. fregante commented on Dec 11, 2017

    @fregante
    Member

    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.

  2. jgierer12 commented on Dec 27, 2017

    @jgierer12
    Contributor

    How about something like this:
    Auto merge concept

    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.

  3. fregante commented on Dec 27, 2017

    @fregante
    Member

    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:

    • wait for tests to pass
    • automatically post the comment
    • automatically delete branch
    • automatically close window
    • $ say hurray! 😜

    Perhaps we can find a more refined UI

  4. hkdobrev commented on Dec 27, 2017

    @hkdobrev
    Contributor

    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”

    @bfred-it What do you imagine?


    Question: why would it be a duplicated form?

    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.

  5. fregante commented on Dec 27, 2017

    @fregante
    Member

    closing the window is not needed

    Yeah that was tongue in cheek

    Comments I think should be made custom

    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

    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

    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.

    @bfred-it What do you imagine?

    I mean a single checkbox literally with the label “Wait for tests to pass”, where @jgierer12 placed the radio boxes.

    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.

    I'm lost. Screenshot/mockup?

  6. locked as resolved and limited conversation to collaborators on Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions