integrations / integrations/terraform-provider-github
[FEAT]: Expose default_repository_branch and secret_scanning_validity_checks_enabled in github_organization_settings
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 8
Description
### Describe the need
Two attributes that already exist on go-github v85's `Organization` struct are returned by `GET /orgs/{org}` and `PATCH /orgs/{org}` responses, but are not yet surfaced by `github_organization_settings` (resource) or `github_organization` (data source):
- `default_repository_branch` — the default branch name applied to new repositories created in the organization (commonly `main`). Backed by `Organization.DefaultRepositoryBranch` (`*string`) in go-github.
- `secret_scanning_validity_checks_enabled` — whether automatic validity checks on supported partner tokens are enabled for the organization. Backed by `Organization.SecretScanningValidityChecksEnabled` (`*bool`) in go-github.
This is the same shape of change as #3389 (which exposes seven other attributes that were already in `go-github`), independent of the `go-github` library updates needed for the few fields that are still missing upstream.
Companion change: also add both to the `github_organization` data source for symmetry, matching the pattern from #1850.
### SDK Version
terraform-provider-github main (post v6.12, current HEAD `add2157906`)
### API Version
REST API 2022-11-28
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Contributor guide
Assessment
This issue has not been assessed yet.