Skip to content
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

Merged
merged 2 commits into from Sep 21, 2022
Merged

Adding resource github_organization_settings to provider closes#1125 #1298

merged 2 commits into from Sep 21, 2022

Conversation

kuhlman-labs
Copy link
Contributor

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

Copy link
Member

@kfcampbell kfcampbell left a 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),
Copy link
Member

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": {
Copy link
Member

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) {
Copy link
Member

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!

@kfcampbell kfcampbell merged commit 759426b into integrations:main Sep 21, 2022
kazaker pushed a commit to auto1-oss/terraform-provider-github that referenced this pull request Dec 28, 2022
…ntegrations#1298)

* adding resouce github_settings to provider

* Spacing and comment changes

Co-authored-by: Keegan Campbell <me@kfcampbell.com>
avidspartan1 pushed a commit to avidspartan1/terraform-provider-github that referenced this pull request Feb 5, 2024
…ntegrations#1298)

* adding resouce github_settings to provider

* Spacing and comment changes

Co-authored-by: Keegan Campbell <me@kfcampbell.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants