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
Adding resource github_organization_settings to provider closes#1125 #1298
Adding resource github_organization_settings to provider closes#1125 #1298
Conversation
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.
Thank you Brett!
Type: schema.TypeString, | ||
Optional: true, | ||
Default: "read", | ||
ValidateFunc: validation.StringInSlice([]string{"read", "write", "admin", "none"}, false), |
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.
If we find ourselves duplicating this logic in the future, we may abstract this into its own helper somewhere.
Type: schema.TypeString, | ||
Optional: true, | ||
}, | ||
"advanced_security_enabled_for_new_repositories": { |
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.
Nice work making changes to the upstream library and following through with them here!
) | ||
|
||
func TestAccGithubOrganizationSettings(t *testing.T) { | ||
t.Run("creates organization settings without error", func(t *testing.T) { |
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.
Tests are passing for me locally!
…ntegrations#1298) * adding resouce github_settings to provider * Spacing and comment changes Co-authored-by: Keegan Campbell <me@kfcampbell.com>
…ntegrations#1298) * adding resouce github_settings to provider * Spacing and comment changes Co-authored-by: Keegan Campbell <me@kfcampbell.com>
Resource allows us to create and manage organization settings using this API endpoint:
https://docs.github.com/en/rest/orgs/orgs#update-an-organization
Also included here are a dependency bump for to go-github vendor. This was necessary for this resource to work as the updated version has the additional Org Struct fields needed.
google/go-github#2471
Additionally some minor edits to the resource
github_tag_protection
doc and error message.closes:
#1125