Skip to content

feat: Expose deploy_keys_enabled_for_repositories on github_organization_settings#3432

Open
JamBalaya56562 wants to merge 1 commit into
integrations:mainfrom
JamBalaya56562:feat/org-deploy-keys-enabled
Open

feat: Expose deploy_keys_enabled_for_repositories on github_organization_settings#3432
JamBalaya56562 wants to merge 1 commit into
integrations:mainfrom
JamBalaya56562:feat/org-deploy-keys-enabled

Conversation

@JamBalaya56562
Copy link
Copy Markdown

Summary

Adds the new deploy_keys_enabled_for_repositories boolean to:

  • github_organization_settings resource (schema, buildOrganizationSettings, debug log, read)
  • github_organization data source (schema, read)
  • Resource and data-source tests, website docs/templates, and example HCL

The diff follows the exact pattern of the adjacent
members_can_fork_private_repositories field so the change stays minimal.

Upstream wiring

The field maps to Organization.DeployKeysEnabledForRepositories /
GetDeployKeysEnabledForRepositories() in go-github, added in
google/go-github#4188 and
released in v86.0.0. This repository picked up v86 in #3413, so the field
is available without any further dependency change.

API reference

Update an organization
explicitly lists deploy_keys_enabled_for_repositories as a PATCH-able
boolean parameter.

I verified end-to-end against a real org (aletheia-works) while testing
the go-github PR — both GET (/orgs/{org}) and PATCH responses include
this field.

Schema choice

Declared as Optional + Computed (no Default) so the provider does not
silently force a value when the user has not specified one. This matches
the conservative pattern of "read whatever the org currently has, only
write when explicitly set." If a Default: false style is preferred,
happy to adjust.

Test plan

  • go build ./...
  • go vet ./...
  • go test -run TestNeverMatch ./github/... (compile-level check of the
    new test assertions; acceptance tests require TF_ACC=1 + tokens and
    were not run locally)
  • CI acceptance tests

…ion_settings

Add the new `deploy_keys_enabled_for_repositories` boolean to the
`github_organization_settings` resource and the `github_organization`
data source. This mirrors the existing `members_can_fork_private_repositories`
pattern (schema, read, buildOrganizationSettings, debug log, tests, docs,
example).

The field maps to `Organization.DeployKeysEnabledForRepositories`, added in
go-github v86 via google/go-github#4188, which the project picked up in integrations#3413.
@github-actions
Copy link
Copy Markdown

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant