sindresorhus/refined-github

Wait for status checks to pass if branch protections are enabled #3038

maxwellainatchi posted onGitHub

<!-- 1. Make sure your requested feature makes sense for Refined GitHub: https://github.com/sindresorhus/refined-github/issues/2960 2. Include a full URL where the feature should appear. -->

Not sure if this counts as a feature request or bug, but if branch protections requiring status checks to complete are enabled and you have admin permissions, it's difficult to get to the checkbox for "wait for status checks to complete before merging". You need to press the merge with admin privileges button, and then click a confirmation checkbox, and then click merge, and it looks very destructive the whole way.

Would be much better if there was a second button on the first PR box in that case that said something like "Merge if status checks are complete", next to the "merge with admin privileges" button


Sadly this is impossible

posted by fregante almost 5 years ago

The difference between that issue and mine is that I'm referring specifically to when you have admin privileges - the normal "merge" box is in a hidden form element.

(I had to redact part of it for confidentiality reasons)

<form class="merge-branch-form js-merge-pull-request js-immediate-updates js-tryable-again js-needs-timeline-marker-header js-admin-override-merge js-admin-override-squash js-admin-override-rebase" action="/[username]/[repo_name]/pull/[pr_number]/merge" accept-charset="UTF-8" method="post" style="display: block;">
posted by maxwellainatchi almost 5 years ago

This is what it looks like for me, which looks and works as I expect it to.

<img width="763" alt="" src="https://user-images.githubusercontent.com/1402241/80425498-079ef380-88e4-11ea-9e3e-587ca277c514.png">

Can you show me what you'd change?

posted by fregante almost 5 years ago

@fregante is there a specific setup required for this checkbox to appear? I have a number of required checks for my PRs, but I don't see the option.

posted by kohtenko almost 5 years ago

The check appears if there's a yellow dot (i.e. an "in progress" check) on the current page. That's all we look for.

Try refreshing the page, this feature might not appear sometimes: #3041

If it's not there, can you post a screenshot like the one I posted?

posted by fregante almost 5 years ago

Sure @fregante. Here's what I see when checks are running. <img width="689" alt="Screen Shot 2020-04-30 at 9 17 36 AM" src="https://user-images.githubusercontent.com/800103/80715105-e137ae80-8ac3-11ea-890f-35a9889c6c92.png">

When I click Squash and merge the checks view hides and and this is what I see

<img width="681" alt="Screen Shot 2020-04-30 at 9 17 45 AM" src="https://user-images.githubusercontent.com/800103/80715235-117f4d00-8ac4-11ea-894b-ce4810cd715e.png">

posted by kohtenko almost 5 years ago

ah @fregante sorry, seems like there's a bug that sometimes prevents that checkbox from appearing on the administrator confirm box (as in what @kohtenko just posted) - not sure what exactly causes it, but a page refresh usually fixes it. Maybe a race condition? I only have 1 check running, so it might need to wait for all status checks to initially report their status before loading that box

posted by maxwellainatchi almost 5 years ago
posted by fregante almost 5 years ago

Fund this Issue

$0.00
Funded

Pull requests