Skip to content

[FEAT]: Expose default_repository_branch and secret_scanning_validity_checks_enabled in github_organization_settings #3390

@JamBalaya56562

Description

@JamBalaya56562

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

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: TriageThis is being looked at and prioritizedType: FeatureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions