terraform-provider-github
terraform-provider-github copied to clipboard
[FEAT]: Support Push Rulesets
Describe the need
GitHub launched push rules for rulesets to GA recently where you can allow only a certain team or group to push particular paths or files. The API appears to support push rule targets for both Repository and Organisation.
It would be great to be able to support creating and managing these with terraform. This is depends on https://github.com/google/go-github/issues/3274 adding support in the SDK.
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
Was this ever released https://github.com/integrations/terraform-provider-github/pull/2351?
@akmalharith I was wrong in my original assessment, support for push existed in the SDK but not for 3/4 of the rule types for push rules. I have opened a PR to add them to the SDK then will pick this up once merged and upgraded.
@akmalharith FWIW #2351 was released as part of v6.3.0.
https://github.com/google/go-github/issues/3274 is part of the version v66.0.0 which is now released. I have created https://github.com/integrations/terraform-provider-github/issues/2419.
Would be awesome to get this merged in!
While go-github is now updated to v66.0.0, changes are still required in github/resource_github_organization_ruleset.go and github/resource_github_repository_ruleset.go (at least).
Rules such as max_file_size and file_path_restriction need to be added.
There seems to be other work in progress, such as #2415 for file_path_restriction, but that is for repository rulesets.
@jimsheldon have you requested this be covered as part of #2415?
@jimsheldon @stevehipwell I have added the max_file_size restriction to #2415. As I do not have admin access to an organisation with paid features I am uncomfortable adding features I can't test.
Any update on when push restrictions will be added? Specifically looking for the file type restriction, and as of v6.4.0 seems there is still no push support, at least according to the docs.
@adrian-85 I have added this to the PR related #2415 for you, I don't need this feature myself which is why I didn't add it originally. Please upvote the PR to help get it reviewed.
I added a thumbs up to your last comment in the PR conversation, is that what you meant by upvote?
Hi Team any update on this
This is a most wanted feature on our side
Hi Team, any update on this feature? It's been a long-awaited feature.
Any updates?