-
Notifications
You must be signed in to change notification settings - Fork 746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat : Support repository property for GitHub organization ruleset #2356
base: main
Are you sure you want to change the base?
feat : Support repository property for GitHub organization ruleset #2356
Conversation
Refactor logic to reduce the cognitive complexity and add logic to handle the repository_property field
bb62d7a
to
40c5111
Compare
@kfcampbell, could you take a quick look to see if I need to improve anything in this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Have you looked at expanding the tests in github/resource_github_organization_ruleset_test.go
to cover this usecase yet?
A test case was added, I hope the change was not to ugly |
@kfcampbell can I do anything to speed up the review of this PR? |
Elem: &schema.Schema{ | ||
Type: schema.TypeString, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this handle properties with boolean values? From a json export which shows the use of string "false"
and "true"
I assume it does
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I manualy tested the solution and can handle boelean custom_properties using strings
Refactor repository property conditions to make them optional Flatten update Target parameters to allow the detection of changes when remote resource is updated
Wait for the upgrade to go-github/v65/github to start use the source property
@Moser-ss I think you need to update the docs to reflect these changes? |
Resolves #2137
Introduces the support to use
repository_property
to target repositories in the rulesetThe changes were manually tested against a GitHub Organization with an enterprise plan.
It is not possible to add properties with the source system because the lib version doesn't allow that. It is necessary to update to version v65
Before the change?
repository_property
After the change?
repository_property
under the conditions blockPull request checklist
Does this introduce a breaking change?
Please see our docs on breaking changes to help!