fix!: Enterprise App installation repos options structs#4298
Conversation
|
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. |
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @zry98!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
cc: @stevehipwell - @alexandear - @zyfy29 - @Not-Dhananjay-Mishra
There was a problem hiding this comment.
These really belong in https://github.com/google/go-github/blob/master/github/enterprise_app_installation.go along with the other APIs defined in https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/organization-installations
BREAKING CHANGE:
SelectedRepositoryIDs []int64is nowRepositories []stringin*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 expectsrepositories([]string) according to GitHub REST API documentation: https://docs.github.com/en/enterprise-cloud@latest/rest/enterprise-admin/organization-installations?apiVersion=2022-11-28Breaking change
Callers using
SelectedRepositoryIDs []int64must change toRepositories []stringand switch the values from ID integers to name strings.The structs
AppInstallationRepositoriesOptionsandUpdateAppInstallationRepositoriesOptionsare also renamed toAppInstallationRepositoriesRequestandUpdateAppInstallationRepositoriesRequestrespectively (theOptionssuffix is reserved for query parameters in this repo; these are request bodies and should useRequest#4298 (comment)).Although it wasn't working correctly before.