-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
MNT: prevent merging using labels + branch protection rules #27668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
f7c4e10
to
e189edf
Compare
I fundamentally support the idea of distinguishing the two cases better. I'm always hesitant with request changes because somebody has to dismiss the review afterwards, and GitHub makes quite a song and dance out of that, so that it feels awkward to dismiss someone's else review, |
b53b36b
to
3381620
Compare
484260c
to
3d1800b
Compare
Note, I couldn't add a rule on this workflow passing yet, probably because it's not had any runs in this repo. So we can't really preview it (at least with this workflow). |
Have I managed a catch 22 where we can't see how it fully works before discussing b/c that requires a merge but it'd be nice to see how it fully works before merging? 😶 |
I could set it on other checks, but that would likely affect other PRs. However, I don't think it would look too different from how it does now with the "Merging is blocked" error due to not having any approving reviews. |
Yeah, in all seriousness I figure it'll work like the required label check on any sphinx gallery PR -> which👀 how they label the required ones |
This seems reasonable. |
3d1800b
to
483ec35
Compare
698fcd5
to
46ecbf5
Compare
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
51b64ac
to
7333228
Compare
@ksunden has a pass and a fail state now |
Hmm, I thought we had merged this already. It's not really waiting for another PR, right? That was just for testing? |
Yup! |
Though now it doesn't seem to be working 🤦♀️ |
It looks green to me? |
ok, so looks like it's working but there's just some lag sometimes |
I'm not sold on the utility of this, and it just seems to needlessly complicate the status of PRs. We already have "block" and "Draft" as tools to indicate changes need to be made, or we can even go so far as to close PRs. We can also communicate in the comments. With this change we have to further remember a list of tags that will opaquely block merging and remember which ones we need to remove to un-block. That doesn't seem that helpful to our workflows. |
It's the two tags that already informally mean "don't merge" without doing the further action described in the tag . Basically all I'm doing here is programmatically enforcing an unwritten convention we already have. |
I've generally used those tags in the past to mean that something needs input from other people, and/or discussion at the weekly meeting. I'm not sure I've ever used them to mean "don't merge this". |
We've already discussed this on the call and decided to try it out, and see if it's effective. |
This is now required on PRs. I couldn't find it as the workflow name, but it turns out it's listed by job name. |
PR summary
Kinda been bugging @QuLogic about this for a while...
This PR + some one w. org access adding a branch protection rule that blocks merges when this status check fails would allow us to grey out merging using a specific set of labels.
As you can see in the workflow, the status check fails b/c this is labeled "status: needs comment/discussion" (and I tried to turn off most of the CI checks so folks can play with adding and removing the label)
The motivation is b/c 'request changes' for reviews can be used in two ways:
And I think using it for 2. has made folks wary of using it for 1, and instead some maintainers use "leave comment" to communicate what they would need to see changed before they merge.
My hope is that decoupling small comments from requesting technical changes from blocking a PR b/c there isn't consensus (or on some other label b/c it's an or list) can help us better communicate and manage expectations around what needs to happen next in the PR - make small set of changes or wait on discussion - and make maintainers more likely to use 'request changes' instead of 'comment' to communicate what they're waiting on being implemented before approving. If a maintainer disagrees on a "requested change", then they can always add a blocking label.
Bonus is it also is a way to flag "this is not in draft, but also not ready for merging" for POC type work.
PR checklist