Skip to content

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

Open
adamcrews wants to merge 1 commit into
integrations:mainfrom
adamcrews:feat/go-github-v93
Open

adamcrews wants to merge 1 commit into
integrations:mainfrom
adamcrews:feat/go-github-v93

Conversation

@adamcrews

@adamcrews adamcrews commented Oct 27, 2026 •

Copy link
Copy Markdown

Unblocks #3698 (dismissal_restriction on ruleset pull_request rules needs types that first ship in go-github v93).

Supersedes #3685, which made the same bump and was closed by its author without merging.

Allows for implementing secrets and variable management for Copilot Agents.


Before the change?

  • Provider used go-github v92.

After the change?

  • Provider uses go-github v93.0.0. No user-facing behaviour changes.
  • RepositoriesService.Create now takes a CreateRepositoryRequest. expandCreateRepositoryRequest maps the same fields v92 copied internally, so the create body is unchanged. Unlike chore: Update go-github to v93.0.0 #3685, the mapper also copies Private, TeamID, UseSquashPRTitleAsDefault and CustomProperties. The provider doesn't set these today, so this is for completeness, not a behaviour fix.
  • TestExpandCreateRepositoryRequest covers the mapping (the regression coverage Copilot asked for on chore: Update go-github to v93.0.0 #3685). It fills every pointer field that Repository shares with the request and fails if any field isn't carried over, or if the request gains a field with no Repository counterpart.
  • The renamed request types (AddCollaboratorRequest, AddTeamMembershipRequest, AddTeamRepoRequest, CreateForkRequest) now take pointer fields. Every value comes from a schema field with a non-empty default, so the request bodies are unchanged.
  • The fields that became non-pointer in fix!: Match request body fields to the OpenAPI schemas google/go-github#4581 are always set explicitly by the provider. I checked every changed struct between v92 and v93, so no zero values are sent where a field used to be omitted.
  • Rebased onto main after the internal/ghclient refactor (feat: Refactor new client #3739). The new client code only needed the import bump. Test helpers that main added or changed since then now use the v93 request types, and resource_github_actions_organization_permissions.go keeps main's rewrite with EnabledRepositories as a plain string.
  • The main driver for me opening this PR is to allow for a downstream PR to add the secrets and variable management for copilot agents that was introduced in v92 and v93.

make lintcheck and make lintcheck-new pass. make test has three failures, and all three also fail on main without this change: TestAccDataSourceGithubOrganizationSecurityManagers panics with a nil pointer, TestParseRetryAfter gets 0s instead of 10m, and TestNewSource/errors/cache_path_shared_with_another_source is flaky and failed 6 of 8 runs on main. I haven't run the acceptance tests for this change.

This PR was prepared with AI assistance (Claude). However, this has been human reviewed, and we have been running this in our environment for a few weeks now.

Pull request checklist

  • Schema migrations have been created if needed (example)
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

@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.

@github-actions github-actions Bot added the Type: Feature New feature or request label Oct 27, 2026
@stevehipwell

Copy link
Copy Markdown
Collaborator

@adamcrews I'm already working on a PR for google/go-github/v93.

@adamcrews

Copy link
Copy Markdown
Author

@adamcrews I'm already working on a PR for google/go-github/v93.

No worries. I saw that #3685 had been closed, but no other PR's referencing v93 yet. I'm happy to close this one if it's not needed.

My main goal is to get v93 in so I can add the variable and secrets management for copilot cloud agents.

@deiga

deiga commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

@adamcrews notice that v93 has major implications for GHES and GHEC authentication and can't be upgraded to without understanding how to integrate those

Migrate to the v93 request types. Repository creation now builds a
CreateRepositoryRequest from the expanded repository object, mapping the
same fields go-github v92 copied internally so the request body is
unchanged. A unit test fails if a request field is left unmapped.

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

Copy link
Copy Markdown
Collaborator

Should we close this one since @stevehipwell is already working on it?

This branch has not been deployed

No deployments
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.

4 participants