Skip to content

fix!: Enterprise App installation repos options structs#4298

Open
zry98 wants to merge 2 commits into
google:masterfrom
zry98:fix/enterprise-app-repos-payload
Open

fix!: Enterprise App installation repos options structs#4298
zry98 wants to merge 2 commits into
google:masterfrom
zry98:fix/enterprise-app-repos-payload

Conversation

@zry98

@zry98 zry98 commented Jun 12, 2026

Copy link
Copy Markdown

BREAKING CHANGE: SelectedRepositoryIDs []int64 is now Repositories []string in *AppInstallationRepositoriesOptions.

The PR #3831 added bindings for the enterprise org-installation repository endpoints, but the request body struct uses a wrong field selected_repository_ids ([]int64), while the actual API expects repositories ([]string) according to GitHub REST API documentation: https://docs.github.com/en/enterprise-cloud@latest/rest/enterprise-admin/organization-installations?apiVersion=2022-11-28

Breaking change

Callers using SelectedRepositoryIDs []int64 must change to Repositories []string and switch the values from ID integers to name strings.

The structs AppInstallationRepositoriesOptions and UpdateAppInstallationRepositoriesOptions are also renamed to AppInstallationRepositoriesRequest and UpdateAppInstallationRepositoriesRequest respectively (the Options suffix is reserved for query parameters in this repo; these are request bodies and should use Request #4298 (comment)).

// before
opts1 := AppInstallationRepositoriesOptions{
  SelectedRepositoryIDs: []int64{12345, 67890},
}
opts2 := UpdateAppInstallationRepositoriesRequest{
  RepositorySelection:   Ptr("selected"),
  SelectedRepositoryIDs: []int64{12345, 67890},
}

// after
opts1 := AppInstallationRepositoriesRequest{
  Repositories: []string{"repo-a", "repo-b"},
}
opts2 := UpdateAppInstallationRepositoriesRequest{
  RepositorySelection: Ptr("selected"),
  Repositories:        []string{"repo-a", "repo-b"},
}

Although it wasn't working correctly before.

@google-cla

google-cla Bot commented Jun 12, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gmlewis gmlewis added NeedsReview PR is awaiting a review before merging. Breaking API Change PR will require a bump to the major version num in next release. Look here to see the change(s). labels Jun 12, 2026
@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.47%. Comparing base (952dff0) to head (bf9cf6a).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4298   +/-   ##
=======================================
  Coverage   97.46%   97.47%           
=======================================
  Files         192      193    +1     
  Lines       19258    19310   +52     
=======================================
+ Hits        18770    18822   +52     
  Misses        270      270           
  Partials      218      218           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gmlewis gmlewis changed the title fix!: Enterprise App installation repos structs fix!: Enterprise App installation repos options structs Jun 12, 2026

@gmlewis gmlewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you, @zry98!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.

cc: @stevehipwell - @alexandear - @zyfy29 - @Not-Dhananjay-Mishra

Comment thread github/enterprise_apps.go Outdated
Comment thread github/enterprise_apps.go Outdated
Comment thread github/enterprise_apps.go

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Breaking API Change PR will require a bump to the major version num in next release. Look here to see the change(s). NeedsReview PR is awaiting a review before merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants