-
Notifications
You must be signed in to change notification settings - Fork 8
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
Disable merge button for certain labels #90
Comments
by "disable merge button" I assume you mean set a failing check? |
something stronger, to have the greyed out merge button, similarly when no one yet approved it. |
Is that something you can do via the github API? |
I'm not sure. Did I mention it was cunning plan? 😏 |
The way I know will work is that you setup a specific check for the label check, and then make it a required check using protected branches. I can't see anything in the API about blocking merge. |
Oh, that would work quite nicely I suppose. |
Unless you wanna define your own action for this, you can use this one: https://github.com/marketplace/actions/enforce-pr-labels |
It would be neat to have this. Just landed here after skimage wanted the same, but I believe it would have to be implemented on a GH level. |
I don't think we can grey out the merge button, but there could be a required workflow that fails when the label is present. I think people with just write level permissions would not be able to override such a branch protection. |
This is what we have on scikit-image, but it's not great when newcomers get a red cross on their PR, without the ability to turn it green themselves :/ [In our case, the requirement is to have a |
Ah, the circle closes, I believe I was complaining about that failing labelling job myself 😂 |
FWIW I think this can be accomplished in Actions now, without |
Yes, this is what we chatted about above that we can currently have a failing required workflow/job controlled by a label, but that red cross could be annoying and or confusing to contributors (and also reviewers, I certainly could get less attention from maintainers' on some of my PRs when there were CI failures, even if they were clearly unrelated) |
If the red cross only shows up when a maintainer chooses to apply a label, then it would be green most of the time. Personally I will be okay with that. There is also a totally unrelated request for GitHub to just make all PRs draft by default (merge button is automatically disabled) but after so many years, that request is still open. |
Yeap, original use case for this issues, the downstream testing label, would indeed be rare, but skiimage's case is the opposite, it would not allow merging before adding certain labels. |
Hmm... You could also require N number of approvals before merge. I think that disables the merge button until approvals given without any red X ? |
Regardless, I feel like this has nothing to do with baldrick anymore. Is there an issue over at |
Yes, agreed on closing this for baldrick. It was a cunning plan that didn't work out 🤣 |
What a cunning plan!
It would be nice to be able to disable the merge button while a PR has a certain label set.
E.g. astropy/astropy#9282 needs to be tested in a downstream package, so ideally it should not be merged until the
needs-downstream-testing
label is present. I suspect this logic could be used for other labels, too.The text was updated successfully, but these errors were encountered: