feat: Expose default_repository_branch and secret_scanning_validity_checks_enabled#3391
Open
JamBalaya56562 wants to merge 1 commit intointegrations:mainfrom
Conversation
…hecks_enabled
Surface two attributes that already exist on the upstream go-github v85
Organization struct but were not yet exposed by github_organization_settings:
- default_repository_branch (Organization.DefaultRepositoryBranch)
- secret_scanning_validity_checks_enabled (Organization.SecretScanningValidityChecksEnabled)
Both are also added to the github_organization data source for symmetry.
These fields are returned by GET /orgs/{org} and present in the response
body of PATCH /orgs/{org}, so they are read-back-able. They use Optional
+ Computed so existing configurations that omit them continue to track
the live API value without producing phantom diffs (per the pattern
recommended in integrations#3385).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
👋 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #3390
Before the change?
github_organization_settingsresource andgithub_organizationdata source did not surface two attributes that are already modeled on go-github v85'sOrganizationstruct and returned byGET/PATCH /orgs/{org}responses.After the change?
github_organization_settings:default_repository_branch— the default branch name applied to new repositories (e.g.main). Backed byOrganization.DefaultRepositoryBranch.secret_scanning_validity_checks_enabled— automatic validity checks on supported partner tokens for the organization. Backed byOrganization.SecretScanningValidityChecksEnabled.github_organizationdata source for symmetry, matching the pattern from Expose additional attributes for GitHub organizations. #1850.Organizationstruct in the upstreamgo-githublibrary, so this PR simply surfaces them in the Terraform provider, in the same shape as feat: Add support for members_can_change_repo_visibility in github_organization_settings #3147 / feat: Expose remaining org attributes in github_organization_settings #3389.Optional + Computedso existing configurations that omit them continue to track the live API value without producing phantom diffs (per the pattern recommended in [BUG] members_can_create_internal_repositories in github_organization_settings missing Computed: true causing phantom diffs #3385).This PR is independent of #3389 and can be reviewed/merged in either order.
Pull request checklist
Does this introduce a breaking change?