terraform-provider-github icon indicating copy to clipboard operation
terraform-provider-github copied to clipboard

[FEAT]: Add support for allowing force pushes for specified people, teams, apps

Open jdatx opened this issue 1 year ago • 3 comments

Describe the need

I'm using semantic versioning and this requires force pushes. I've got a github app that I'd like to allow force pushes for this. When I configure this in the gui, works fine.

SDK Version

No response

API Version

No response

Relevant log output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

jdatx avatar Sep 18 '24 18:09 jdatx

@jdatx are you referring to the ability to specify an app in a github_repository_ruleset as a bypass actor? If so doesn't this already work with actor_type = "Integration"?

stevehipwell avatar Oct 09 '24 13:10 stevehipwell

Thanks for getting to this it's appreciated.

I was talking about the github_branch_protection resource.

I'll have to reproduce it but I don't recall why the github_repository_ruleset didn't work for my case

jdatx avatar Oct 10 '24 02:10 jdatx

@jdatx I'm not affiliated with this repo, I'm just an end user.

It looks like branch protection is still supported by GH (under the classic branch protection rule name), but if I were you I'd look at using a ruleset instead. I'm not aware of any use cases not supported by a ruleset, and since they were supported in the GH TF provider they've been made to work (the original implementation was pretty much unusable).

stevehipwell avatar Oct 10 '24 08:10 stevehipwell

This can be closed. The desired behavior is achieved by

force_push_bypassers   = [...]

and in the required_pull_request_reviews specifying pull_request_bypassers.

jdatx avatar Mar 17 '25 19:03 jdatx