This is a follow up to #865 and #975
If a branch is protected and has the flag Require status checks to pass before merging enabled, then I don't see how I could use the existing feature.

Because until those checks aren't successful, I just see a grayed out button and can't press anything:

It would be awesome, if there would be another button (created by this extension) next to it, to merge as soon as all checks have passed.
If the form is just hidden but in the dom, then it’s feasible. It can be un-hidden and the checkbox would have to be readonly
I just came across this exact problem too :(
I took a look at the DOM and the ID merge_message_field doesn't exist when Require status checks to pass before merging is checked. This is the ID of the text area with the squash message.
So it looks like it would be slightly harder than just unhiding it :(
This feature would be ✨
I'm adding some gasoline by noting that Azure DevOps currently provides this functionality
To add this feature, we'd have to recreate the whole form, including the logic between merging types. Additionally, we can't know which merging types are available (e.g. a repo only allows Squashing). Sounds impossible 🙁
I think you should ask GitHub to implement our wait-for-build feature (regardless of this requirement)
fwiw this works for me as a browser snippet
function autoMerge() {
const btn = window.$$('button').filter(el=>el.innerText === 'Merge pull request')[0]
if (btn) {
btn.click()
const btn2 = window.$$('button').filter(btn=>btn.innerText === 'Confirm merge')[0];
if (btn2) {
btn2.click()
return
}
}
setTimeout(autoMerge, 1000)
}
window.$$ = $$;
autoMerge();
That only works if you're fine with the default commit title and message. It's a good workaround but probably most people would expect to be able to preview/edit them.
Thank you for posting it!
@fregante can you add a little message next to the merge button that explains why the feature isn't working? I thought there was an issue with GHR originally
this is now a built-in feature:
Auto-merge pull requests (https://github.com/github/roadmap/issues/107): when using protected branches. Rolling out over the next couple of weeks, enabled in your repo settings.
Thanks for the update!
That’s completely different from “Auto-merging” as intended by this extension (i.e. the user still has to click Merge whereas GitHub’s new feature will be completely automatic) but it’s probably what most people are after 🎉
Most helpful comment
fwiw this works for me as a browser snippet