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

feat(github_branch_protection_v3): Add support for bypass_pull_request_allowances #1578

Conversation

syakir-uzair
Copy link
Contributor

@syakir-uzair syakir-uzair commented Mar 5, 2023

Resolves #1577


Behavior

Before the change?

  • Unable to manage bypass pull request configuration using github_branch_protection_v3 resource

After the change?

  • Able to manage bypass pull request configuration using github_branch_protection_v3 resource by adding codes as written below:
resource "github_branch_protection_v3" "test" {
  required_pull_request_reviews {
    bypass_pull_request_allowances {
      users = ["foo-user"]
      teams = [github_team.example.slug]
      apps  = ["foo-app"]
    }
  }
}

Other information


Additional info

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Added the appropriate label for the given change

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes (Please add the Type: Breaking change label)
  • No

If Yes, what's the impact:

  • N/A

Pull request type

Please add the corresponding label for change this PR introduces:

  • Bugfix: Type: Bug
  • Feature/model/API additions: Type: Feature
  • Updates to docs or samples: Type: Documentation
  • Dependencies/code cleanup: Type: Maintenance

@kfcampbell
Copy link
Member

@syakir-uzair do you have interest in picking this back up? The linting errors failing the bulid should be easy to resolve.

syakir-uzair and others added 4 commits March 13, 2023 23:02
…//github.com:/syakir-uzair/terraform-provider-github into feat/github_branch_protection_v3_bypassers
…//github.com:/syakir-uzair/terraform-provider-github into feat/github_branch_protection_v3_bypassers
@syakir-uzair
Copy link
Contributor Author

@kfcampbell Sure, I have fixed the linting error

@audunsolemdal
Copy link

I'd be grateful if a maintainer could look at this again. Support for pr bypassers is the only feature I am missing in order to replace github_branch_protection for github_branch_protection_v3

Copy link
Member

@kfcampbell kfcampbell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for contributing!

@kfcampbell kfcampbell merged commit 70a0a5a into integrations:main Apr 3, 2023
avidspartan1 pushed a commit to avidspartan1/terraform-provider-github that referenced this pull request Feb 5, 2024
…t_allowances (integrations#1578)

* feat(github_branch_protection_v3): Add support for bypass_pull_request_allowances

* fix: Get bpra

* chore: Remove debug

* chore: Remove debug

* fix: Lint

* fix: Test

* Test rename for convention

---------

Co-authored-by: Nick Floyd <139819+nickfloyd@users.noreply.github.com>
Co-authored-by: Keegan Campbell <me@kfcampbell.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT]: Add support for bypass_pull_request_allowances in github_branch_protection_v3 resource
4 participants