Skip to content
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

Add support to Allow specified actors to bypass pull request requirements #1005

Closed
jtyr opened this issue Dec 7, 2021 · 7 comments
Closed
Labels
r/branch_protection Status: Stale Used by stalebot to clean house Type: Feature New feature or request

Comments

@jtyr
Copy link
Contributor

jtyr commented Dec 7, 2021

The provider is missing option to "Allow specified actors to bypass pull request requirements" in the branch protection rule settings.

# Settings -> Branches -> <ProtectionRule> -> Protect matching branches:

|X| Require a pull request before merging
    |X| Allow specified actors to bypass pull request requirements
        <ListOfTeamsOrUsers>
@jtyr
Copy link
Contributor Author

jtyr commented Dec 8, 2021

There is no support for this in the google/go-github package and neither this feature is documented in the official GitHub REST API 😞

@majormoses
Copy link
Contributor

It looks like they added support for it in GraphQL API: https://docs.github.com/en/graphql/reference/input-objects#updatebranchprotectionruleinput it looks as if we need to pass bypassPullRequestActorIds with an array of ids.

@jtyr
Copy link
Contributor Author

jtyr commented Dec 14, 2021

As soon as the githubv4 package supports this feature, we will be able to add it into this provider. I guess the author of githubv4 must regenerate the code from the latest GitHub GraphQL schema.

@jtv8
Copy link

jtv8 commented Apr 6, 2022

#1030 is now merged and looks to be available as pull_request_bypassers in the provider: https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch_protection#required-pull-request-reviews - should this issue be closed now?

@chenshap
Copy link

is it planned to be added to github_branch_protection_v3?
https://registry.terraform.io/providers/integrations/github/latest/docs/resources/branch_protection_v3

@github-actions
Copy link

github-actions bot commented Jan 6, 2023

👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

@github-actions github-actions bot added the Status: Stale Used by stalebot to clean house label Jan 6, 2023
@kfcampbell
Copy link
Member

I'm going to close this issue as pull request bypassers are implemented in the non-v3 resource. @chenshap it's still an outstanding need to add this functionality to the v3 version of the resource, though it's still not available in google/go-github. It is, however, exposed in the REST API. Please feel free to create another issue to track that work if you'd like!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
r/branch_protection Status: Stale Used by stalebot to clean house Type: Feature New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants