terraform-provider-github
terraform-provider-github copied to clipboard
[FEAT]: Disable GitHub Actions can approve pull requests
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
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 :)
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