Skip to content

chore: Update go-github to v93.0.0 - #3685

Closed
benlangfeld wants to merge 3 commits into
integrations:mainfrom
benlangfeld:bump-go-github-v93
Closed

benlangfeld wants to merge 3 commits into
integrations:mainfrom
benlangfeld:bump-go-github-v93

Conversation

@benlangfeld

@benlangfeld benlangfeld commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Unblocks #3658.

go-github v93.0.0 was released on 2026-10-15. This bumps the provider to it.

Before the change?

After the change?

  • Provider on go-github/v93.
  • Builds, vets and passes the unit tests.

What the upgrade actually required

v93 carries ten breaking changes. Four touch this provider:

Four request types renamed and passed by value, with the fields the provider sets becoming pointers (#4606, #4607):

v92 v93
RepositoryAddCollaboratorOptions AddCollaboratorRequest
TeamAddTeamMembershipOptions AddTeamMembershipRequest
TeamAddTeamRepoOptions AddTeamRepoRequest
RepositoryCreateForkOptions CreateForkRequest

Required body fields stopped being pointers (#4581) — eleven struct literals no longer take an address. Note these move in the opposite direction to the four above, which is worth a careful eye in review; three of my first attempts were over-corrections the compiler caught.

RepositoriesService.Create takes CreateRepositoryRequest by value (#4616) — a narrower struct, not a renamed Repository. This is the only part that is not mechanical, and is described below.

repositoryCreateRequest

The provider builds a *github.Repository and passes it to Create. Five of the fields it sets have no place in CreateRepositoryRequest: topics, archived, has_downloads, security_and_analysis and web_commit_signoff_required. Every other field is mapped, including allow_forking and the merge and squash commit title and message settings.

All five still land:

  • topics — ReplaceAllTopics, immediately after create, as before.
  • archived, has_downloads, security_and_analysis, web_commit_signoff_required — resourceGithubRepositoryCreate ends with return resourceGithubRepositoryUpdate(...), which rebuilds the full object through resourceGithubRepositoryObject(d) and calls Repositories.Edit.

So the observable behaviour is unchanged. I would still rather a maintainer confirmed that reading than take my word for it.

One thing this PR does not address

Warning

google/go-github#4564: "Credentials are sent only to a client's configured API and upload origins — every other destination, including a redirect hop, goes out unauthenticated… BasicAuthTransport and UnauthenticatedRateLimitedTransport gained AllowedOrigins, which GitHub Enterprise users must set."

This produces no compile error, and the provider has no reference to AllowedOrigins, BasicAuthTransport or UnauthenticatedRateLimitedTransport. The provider supports GHES through base_url, so there may be an enterprise-facing behaviour change here that nothing in the build or the tests will surface.

I have deliberately not guessed at it: what the provider should do about enterprise origins is a maintainer's call about your users, not something to decide inside a dependency bump. Happy to implement whatever you would like, in this PR or a follow-up.

Testing

  • go build ./..., go vet ./..., gofmt -l — all clean.
  • go test ./... excluding TestAcc* — passes.
  • Acceptance tests not run; they need credentials. TestAccGithubActionsOrganizationPermissions panics identically on main without them, so that failure is pre-existing rather than introduced here.

168 files, almost all of them the import path.

v93 renames four request types, passes them by value, and replaces the
`*Repository` the create endpoint took with a `CreateRepositoryRequest`.

- `RepositoryAddCollaboratorOptions` -> `AddCollaboratorRequest`
- `TeamAddTeamMembershipOptions` -> `AddTeamMembershipRequest`
- `TeamAddTeamRepoOptions` -> `AddTeamRepoRequest`
- `RepositoryCreateForkOptions` -> `CreateForkRequest`

Each is now passed by value, and the fields the provider sets on them have
become pointers, so they are wrapped. Separately, a set of required body
fields stopped being pointers (google/go-github#4581), so eleven struct
literals no longer take an address.

`repositoryCreateRequest` maps a repository onto the narrower body the
create endpoint accepts. Four fields the provider sets have no place in it
- topics, archived, has_downloads and security_and_analysis - and the
create endpoint has never accepted them. Topics are sent by
ReplaceAllTopics, and the rest by the update that create delegates to once
the repository exists, so all four still land.

Co-Authored-By: Claude Opus 5 <[email protected]>
@github-actions

Copy link
Copy Markdown

👋 Hi, and thank you for this contribution!

This repo is maintained by GitHub and community members on a best-effort basis. We'll get to this as soon as we can.

You can help us prioritize by joining the discussion on open issues and PRs, sharing details on the changes you need, and reviewing other contributions.


🤖 This is an automated message.

@deiga

deiga commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

How does this resolve #3651?

Comment thread github/acc_helpers_test.go Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The repository-create payload conversion needs targeted regression coverage to verify that configured settings remain preserved.

1 open finding
What changed in this PR

These provider review instructions are being used.

Upgrades the provider to go-github v93.0.0, enabling the dependency needed for ruleset dismissal restrictions in #3658.

Changes:

  • Updates dependency versions and imports.
  • Adapts request types and pointer/value fields to v93.
  • Adds a repository-create request mapper and updates existing test callers.
File Description
internal/​ghclient/​token.go Uses v93 client types.
internal/​ghclient/​token_test.go Uses v93 test imports.
internal/​ghclient/​source.go Uses v93 client types.
internal/​ghclient/​rest.go Uses v93 REST client.
internal/​ghclient/​app.go Uses v93 client types.
internal/​ghclient/​anonymous.go Uses v93 client types.
internal/​ghclient/​anonymous_test.go Uses v93 test imports.
go.sum Updates dependency checksums.
go.mod Pins go-github v93.0.0.
github/​util.go Updates v93 import.
github/​util_team.go Updates v93 import.
github/​util_ruleset_validation.go Updates v93 import.
github/​util_ruleset_validation_test.go Updates v93 test import.
github/​util_rules.go Updates v93 import.
github/​util_rules_test.go Updates v93 test import.
github/​util_retry.go Updates v93 import.
github/​util_retry_test.go Updates v93 test import.
github/​util_repo.go Updates v93 import.
github/​util_labels.go Updates v93 import.
github/​util_diff.go Updates v93 import.
github/​transport.go Updates v93 import.
github/​transport_test.go Adapts repository-create test requests.
github/​resource_organization_block.go Updates v93 import.
github/​resource_github_workflow_repository_permissions.go Updates v93 import.
github/​resource_github_user_ssh_key.go Updates v93 import.
github/​resource_github_user_gpg_key.go Updates v93 import.
github/​resource_github_team.go Updates v93 import.
github/​resource_github_team_sync_group_mapping.go Updates v93 import.
github/​resource_github_team_sync_group_mapping_test.go Updates v93 test import.
github/​resource_github_team_repository.go Adapts team repository requests.
github/​resource_github_team_membership.go Adapts membership requests.
github/​resource_github_team_membership_test.go Updates v93 test import.
github/​resource_github_team_members.go Adapts membership requests.
github/​resource_github_team_members_migration_test.go Updates v93 test import.
github/​resource_github_repository.go Adds create mapper; adapts fork requests.
github/​resource_github_repository_webhook.go Updates v93 import.
github/​resource_github_repository_vulnerability_alerts.go Updates v93 import.
github/​resource_github_repository_topics.go Updates v93 import.
github/​resource_github_repository_ruleset.go Updates v93 import.
github/​resource_github_repository_ruleset_test.go Updates v93 test import.
github/​resource_github_repository_pull_request.go Updates v93 import.
github/​resource_github_repository_pages.go Updates v93 import.
github/​resource_github_repository_milestone.go Updates v93 import.
github/​resource_github_repository_file.go Updates v93 import.
github/​resource_github_repository_file_migration_test.go Updates v93 test import.
github/​resource_github_repository_environment.go Updates v93 import.
github/​resource_github_repository_environment_deployment_policy.go Updates v93 import.
github/​resource_github_repository_deployment_branch_policy.go Updates v93 import.
github/​resource_github_repository_deploy_key.go Updates v93 import.
github/​resource_github_repository_custom_property.go Updates v93 import.
github/​resource_github_repository_custom_property_migration.go Updates v93 import.
github/​resource_github_repository_custom_property_migration_test.go Updates v93 test import.
github/​resource_github_repository_collaborators.go Adapts user and team permission requests.
github/​resource_github_repository_collaborator.go Adapts collaborator requests.
github/​resource_github_repository_autolink_reference.go Updates v93 import.
github/​resource_github_release.go Updates v93 import.
github/​resource_github_release_migration_test.go Updates v93 test import.
github/​resource_github_project_column_test.go Updates commented import only.
github/​resource_github_organization_webhook.go Updates v93 import.
github/​resource_github_organization_settings.go Updates v93 import.
github/​resource_github_organization_security_manager.go Updates v93 import.
github/​resource_github_organization_ruleset.go Updates v93 import.
github/​resource_github_organization_role.go Updates v93 import.
github/​resource_github_organization_role_user.go Updates v93 import.
github/​resource_github_organization_role_team.go Updates v93 import.
github/​resource_github_organization_role_team_assignment.go Updates v93 import.
github/​resource_github_organization_repository_role.go Updates v93 import.
github/​resource_github_organization_project_test.go Updates commented import only.
github/​resource_github_organization_custom_role.go Updates v93 import.
github/​resource_github_organization_custom_properties.go Updates v93 import.
github/​resource_github_membership.go Updates v93 import.
github/​resource_github_membership_test.go Updates v93 test import.
github/​resource_github_issue.go Updates v93 import.
github/​resource_github_issue_labels.go Updates v93 import.
github/​resource_github_issue_label.go Updates v93 import.
github/​resource_github_enterprise_security_analysis_settings.go Updates v93 import.
github/​resource_github_enterprise_organization.go Updates v93 import.
github/​resource_github_enterprise_organization_test.go Updates v93 test import.
github/​resource_github_enterprise_actions_workflow_permissions.go Updates v93 import.
github/​resource_github_enterprise_actions_runner_group.go Adapts runner-group request fields.
github/​resource_github_enterprise_actions_permissions.go Adapts enterprise permission fields.
github/​resource_github_emu_group_mapping.go Updates v93 import.
github/​resource_github_dependabot_secret.go Updates v93 import.
github/​resource_github_dependabot_organization_secret.go Updates v93 import.
github/​resource_github_dependabot_organization_secret_repository.go Updates v93 import.
github/​resource_github_dependabot_organization_secret_repositories.go Updates v93 import.
github/​resource_github_codespaces_user_secret.go Updates v93 import.
github/​resource_github_codespaces_secret.go Updates v93 import.
github/​resource_github_codespaces_organization_secret.go Updates v93 import.
github/​resource_github_codespaces_organization_secret_repositories.go Updates v93 import.
github/​resource_github_branch.go Updates v93 import.
github/​resource_github_branch_protection_v3.go Updates v93 import.
github/​resource_github_branch_protection_v3_utils.go Updates v93 import.
github/​resource_github_branch_protection_v3_utils_test.go Updates v93 test import.
github/​resource_github_branch_default.go Updates v93 import.
github/​resource_github_branch_default_migration_test.go Updates v93 test import.
github/​resource_github_app_installation_repository.go Updates v93 import.
github/​resource_github_app_installation_repositories.go Updates v93 import.
github/​resource_github_actions_variable.go Updates v93 import.
github/​resource_github_actions_secret.go Updates v93 import.
github/​resource_github_actions_runner_group.go Adapts runner-group name fields.
github/​resource_github_actions_repository_permissions.go Adapts Actions enabled fields.
github/​resource_github_actions_repository_oidc_subject_claim_customization_template.go Updates v93 import.
github/​resource_github_actions_repository_access_level.go Adapts access-level fields.
github/​resource_github_actions_organization_workflow_permissions.go Updates v93 import.
github/​resource_github_actions_organization_variable.go Updates v93 import.
github/​resource_github_actions_organization_variable_repository.go Updates v93 import.
github/​resource_github_actions_organization_variable_repositories.go Updates v93 import.
github/​resource_github_actions_organization_secret.go Updates v93 import.
github/​resource_github_actions_organization_secret_repository.go Updates v93 import.
github/​resource_github_actions_organization_secret_repositories.go Updates v93 import.
github/​resource_github_actions_organization_permissions.go Adapts organization permission fields.
github/​resource_github_actions_organization_oidc_subject_claim_customization_template.go Updates v93 import.
github/​resource_github_actions_hosted_runner.go Updates v93 import.
github/​resource_github_actions_environment_variable.go Updates v93 import.
github/​resource_github_actions_environment_secret.go Updates v93 import.
github/​migration.go Updates v93 import.
github/​migration_test.go Updates v93 test import.
github/​data_source_github_team.go Updates v93 import.
github/​data_source_github_team_repositories.go Updates v93 import.
github/​data_source_github_team_members.go Updates v93 import.
github/​data_source_github_repository.go Updates v93 import.
github/​data_source_github_repository_webhooks.go Updates v93 import.
github/​data_source_github_repository_test.go Updates v93 test import.
github/​data_source_github_repository_teams.go Updates v93 import.
github/​data_source_github_repository_pull_requests.go Updates v93 import.
github/​data_source_github_repository_file.go Updates v93 import.
github/​data_source_github_repository_environments.go Updates v93 import.
github/​data_source_github_repository_environment_deployment_policies.go Updates v93 import.
github/​data_source_github_repository_deployment_branch_policies.go Updates v93 import.
github/​data_source_github_repository_deploy_keys.go Updates v93 import.
github/​data_source_github_repository_custom_properties.go Updates v93 import.
github/​data_source_github_repository_branches.go Updates v93 import.
github/​data_source_github_repository_autolink_references.go Updates v93 import.
github/​data_source_github_repositories.go Updates v93 import.
github/​data_source_github_release.go Updates v93 import.
github/​data_source_github_ref.go Updates v93 import.
github/​data_source_github_organization.go Updates v93 import.
github/​data_source_github_organization_webhooks.go Updates v93 import.
github/​data_source_github_organization_teams.go Updates v93 import.
github/​data_source_github_organization_team_sync_groups.go Updates v93 import.
github/​data_source_github_organization_role_users.go Updates v93 import.
github/​data_source_github_organization_role_teams.go Updates v93 import.
github/​data_source_github_organization_repositories.go Updates v93 import.
github/​data_source_github_organization_members.go Updates v93 import.
github/​data_source_github_organization_custom_role.go Updates v93 import.
github/​data_source_github_organization_app_installations.go Updates v93 import.
github/​data_source_github_external_groups.go Updates v93 import.
github/​data_source_github_dependabot_secrets.go Updates v93 import.
github/​data_source_github_dependabot_organization_secrets.go Updates v93 import.
github/​data_source_github_collaborators.go Updates v93 import.
github/​data_source_github_codespaces_user_secrets.go Updates v93 import.
github/​data_source_github_codespaces_secrets.go Updates v93 import.
github/​data_source_github_codespaces_organization_secrets.go Updates v93 import.
github/​data_source_github_branch.go Updates v93 import.
github/​data_source_github_actions_variables.go Updates v93 import.
github/​data_source_github_actions_secrets.go Updates v93 import.
github/​data_source_github_actions_repository_oidc_subject_claim_customization_template_test.go Updates v93 test import.
github/​data_source_github_actions_organization_variables.go Updates v93 import.
github/​data_source_github_actions_organization_secrets.go Updates v93 import.
github/​data_source_github_actions_organization_oidc_subject_claim_customization_template_test.go Updates v93 test import.
github/​data_source_github_actions_environment_variables.go Updates v93 import.
github/​data_source_github_actions_environment_secrets.go Updates v93 import.
github/​config.go Updates v93 client import.
github/​acc_test.go Updates v93 test import.
github/​acc_helpers_test.go Adapts collaborator test requests.
github/​acc_helpers_team_test.go Adapts team test requests.
github/​acc_helpers_repository_test.go Uses repository-create mapper.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread github/resource_github_repository.go Resolved
@benlangfeld

Copy link
Copy Markdown
Contributor Author

Sorry, this was supposed to be in draft state still!

@benlangfeld
benlangfeld marked this pull request as draft October 16, 2026 11:50
benlangfeld and others added 2 commits October 16, 2026 14:56
go-github v93 deprecates `github.Ptr` in favour of Go's `new(expr)`, which the rest of the provider already uses. govet's `inline` analyzer flags each call under the strict new-code lint configuration.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
`repositoryCreateRequest` dropped `allow_forking`, `merge_commit_title`, `merge_commit_message`, `squash_merge_commit_title` and `squash_merge_commit_message`, all of which `CreateRepositoryRequest` carries and v92 sent on create. Map them, and add regression tests: one for the request body, including explicit false values, and one for the create flow, checking that topics reach `ReplaceAllTopics` and that the settings the request has no field for reach the subsequent `Edit`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@benlangfeld

Copy link
Copy Markdown
Contributor Author

@deiga It doesn't — #3651 asks for a release to be cut, and this PR does nothing towards that. That line was wrong and I've removed it from the description. The only purpose here is to unblock #3658.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The breaking client upgrade still needs maintainer confirmation of live API and GitHub Enterprise Server compatibility.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

@benlangfeld
benlangfeld marked this pull request as ready for review October 16, 2026 20:43
austenstone added a commit to austenstone/terraform-provider-github that referenced this pull request Oct 19, 2026
Reuse the existing SDK migration while retaining the networking resources and context-aware runner groups.

Co-authored-by: Copilot App <[email protected]>
@adamcrews adamcrews mentioned this pull request Oct 27, 2026
4 of 5 tasks
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.

3 participants