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

[FEAT]: Disable GitHub Actions can approve pull requests

Open ignacio-circle opened this issue 1 year ago • 3 comments

Describe the need

This setting can be applied both at the Organization and Repository level and prevents Github Actions from being able to approve pull request reviews. This setting is necesary to avoid branch protection bypasses as documented here.

There is currently no way to manage this setting through Terraform. The API endpoint to configure this is https://docs.github.com/en/rest/actions/permissions?apiVersion=2022-11-28#set-default-workflow-permissions-for-an-organization and https://docs.github.com/en/rest/actions/permissions?apiVersion=2022-11-28#set-default-workflow-permissions-for-a-repository

This would be a great addition for users that manage all Github settings through TF

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

ignacio-circle avatar Oct 24 '23 12:10 ignacio-circle

Bump on this feature request. I toggle this on and off at the repo and org level and managing it through TF would be useful :)

robbycuenot avatar Nov 14 '23 13:11 robbycuenot

Looks like the go-github module has just merged a change to support the required API requests to support terraforming this setting (https://github.com/google/go-github/pull/3054). There is still no module release containing the new feature but hopefully soon

ignacio-circle avatar Jan 25 '24 15:01 ignacio-circle