[FEAT]: Add Support for GitHub Enterprise Rulesets#3110
[FEAT]: Add Support for GitHub Enterprise Rulesets#3110Ravio1i wants to merge 15 commits intointegrations:mainfrom
Conversation
deiga
left a comment
There was a problem hiding this comment.
Initial pass. Not a complete review.
Please see if there are other parts of the PR where my comments might be applicable :)
|
You're doing good work! I'm wondering if there are patterns from #2958 you should be copying here (for example the conditions and rules validation) |
Thanks! although I wasted a lot of time today being utterly confused of what is actually implemented and exposed in the API/golang sdk. E.g there are parts in the go sdk, which indicate that a ruleset can use the new
I can check it out and see if I can adjust it ! For the importer feature: I left it out intentionally as I was under the impression it is a feature used only in UI. Not sure who actually would use it with terraform/tofu to import json in hcl. |
Similar to the the
|
|
The Importer is functionality to enable |
Oh nevermind, yes that I will most definitely add! I thought you were referring to the importer functionality in GitHub rulesets. Oops |
Added the importer functionality + test TF_CLI_CONFIG_FILE=../dev.tfrc terraform import github_enterprise_ruleset.imported siemens:440187
github_enterprise_ruleset.imported: Importing from ID "siemens:440187"...
github_enterprise_ruleset.imported: Import prepared!
Prepared github_enterprise_ruleset for import
github_enterprise_ruleset.imported: Refreshing state... [id=440187]
Import successful! |
… and remove initial schemaversion
…e actor_type validation
…rise ruleset resource
…se ruleset schema
…ise ruleset schema
…ag, push, and repository targets
…ort and conditions
7dd2b13 to
f5a34a3
Compare
Resolves #2666
Before the change?
No possibility to create or fetch rulesets at enterprise level
After the change?
Pull request checklist
Does this introduce a breaking change?
Please see our docs on breaking changes to help!
Notes
testAccGithubEnterpriseRuleset_required_workflows:Error running post-test destroy, there may be dangling resources forvulnerability-alerts`. The test still works but the vulnerabtily alert seems to be not finished in time. Happy to hear feedback about this