Can we have "Allow specified actors to bypass required status checks" settings? #43460
Replies: 17 comments 38 replies
-
I came here to ask this exact same question for the same reason; I am attempting to build automation around versioning. I am using the release-drafter action, which will produce a Draft Release as users are merging their PR's and it formulates a new version based on the labels of the accumulated PR's. I have made a Github App which responds to My code, as is very common across many different application languages and runtimes, requires the version to be located somewhere in the code (or multiple places). If I'm automating the process of incrementing versions I need a way to apply that version to the code in an automated way. Being unable to push into main branch without granting excessive admin permissions is very prohibitive. That's my scenario but I think its safe to say that regardless of my workflow here there exists legitimate scenarios where automation should be able to push commits directly to protected branches without review. These commits should not require admin privileges though it seems reasonable to require that these users / apps / teams be granted that permission specifically. If that above statement is true then I 2nd @Colin-b's comments and proposed solution; an "Allow specified actors to bypass required status checks" is a perfect solution. |
Beta Was this translation helpful? Give feedback.
-
Would it make sense to just have the "Allow specified actors to bypass pull requests" to just also always be allowed to bypass status checks? It seems pointless to be able to bypass PR's without being able to also be able to bypass status checks. |
Beta Was this translation helpful? Give feedback.
-
same: #18145 |
Beta Was this translation helpful? Give feedback.
-
Hey, I think this is broken. When trying to specify a team for "Allow specified actors to bypass required pull requests" the autocomplete selector will now surface teams, only users. |
Beta Was this translation helpful? Give feedback.
-
I'm now realizing that if you have a CODEOWNER specified, then you can't even merge the PR automatically without a PR review regardless of any settings. |
Beta Was this translation helpful? Give feedback.
-
Still an issue. Signing under all above. |
Beta Was this translation helpful? Give feedback.
-
A way to circumvent the branch protection rules and to be able to commit and push the version bump and the changelog from an action back to the code, could be using an SSH key pair added to the repo, the public part as a deploy key (with r/w permissions) and both private/public ones as the repository secrets. In order to work correctly, one has also perform checkout using the supplied key. For publishing to the GH release, the default runner token (GITHUB_TOKEN) is sufficient. Also, don't forget to pass those secrets to the job with a parameter release.yaml example
|
Beta Was this translation helpful? Give feedback.
-
This is what GitHub needs to implement: |
Beta Was this translation helpful? Give feedback.
-
Much needed feature 🙏 |
Beta Was this translation helpful? Give feedback.
-
+1 for this! |
Beta Was this translation helpful? Give feedback.
-
I was very optimistic this was solved by the new Rulesets functionality, but it doesn't appear to work for our use case (using a GitHub app token). |
Beta Was this translation helpful? Give feedback.
-
+1 for this |
Beta Was this translation helpful? Give feedback.
-
Y'all should check out Repository rules for this use case. Rulesets support layering, meaning you can set a craft a set of rulesets that have bypass targets on apps, roles or teams. You can configure rules in such a way you can enforce status checks for all, but allow the bots or teams to merge bypass those requirements. In this case you’d create two rulesets in your repo. Required for some
Required for all
Theres a discussion for rules over here |
Beta Was this translation helpful? Give feedback.
-
Just tried it yesterday as well, after the June 27, 2023 updates on the rules. Works great now with empty branch protection rule on |
Beta Was this translation helpful? Give feedback.
-
Quite a useful feature for version bump and other use cases. |
Beta Was this translation helpful? Give feedback.
-
Really need something like this. It's blocking my automation attempts. |
Beta Was this translation helpful? Give feedback.
-
What does this setting even do?
The brach protection rules are a total mess and it's nearly impossible to figure out what any one setting there does. I need certain people to be able to merge PRs without waiting for checks or reviews. Not sure if this fits the bill there. |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
As of right now, using GitHub Enterprise, I can put, under the required pull requests, the following settings:
This allows me to have some account that can push to a protected branch without using a pull request (for some automated flow, typically auto-versioning, but it could be anything else really).
The problem is that, if you put required status checks, the push will fail, as it's a direct push to the protected branch (so there is no status).
In order to keep consistency, I think the following setting should be introduced for status checks, the same way it already exists for pull requests:
This will allow to put status checks as required, such as status that are pull requests specific (only triggered when a pull request is opened, synchronized or reopened). Because right now there is no way to mark those status as required while having someone bypassing pull requests.
Thanks again
Beta Was this translation helpful? Give feedback.
All reactions