fix: Replace 'organizations' with 'orgs' in API endpoints by zyfy29 · Pull Request #3673 · google/go-github
As noticed #3671 (comment), it seems that github changed some organizations api endpoints in the two days.
I just fixed my implement yesterday, then did script/metadata.sh update-openapi to follow the change.
Copilot AI review requested due to automatic review settings
August 12, 2025 15:04Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates GitHub API endpoint URLs to replace 'organizations' with 'orgs' in organization-related actions permissions endpoints, following a recent GitHub API change.
- Updates OpenAPI operations metadata to reflect the new endpoint format
- Modifies Go code to use the new
/orgs/{org}/endpoint format instead of/organizations/{org}/ - Updates corresponding test files to match the new endpoint URLs
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| openapi_operations.yaml | Removes old /organizations/{org}/ endpoints and adds new /orgs/{org}/ endpoints for actions permissions |
| github/actions_permissions_orgs.go | Updates URL construction to use /orgs/ prefix instead of /organizations/ |
| github/actions_permissions_orgs_test.go | Updates test mock handlers to use new endpoint URLs |
gmlewis
changed the title
fix: replace 'organizations' with 'orgs' in api endpoints
fix: Replace 'organizations' with 'orgs' in API endpoints
As I mentioned here, maintainers typically update the auto-generated openapi_operations.yaml file. I will run it locally and see if I get the same results.
But just to confirm, did you update this against the public GitHub site (OK), or against an enterprise installation of GitHub (not OK)?
OK, I'm seeing what you are seeing, so we will proceed with this PR. Thank you, @zyfy29!
What I'm amazed at, though, is how GitHub can make a breaking change like this without an announcement... although maybe I simply missed the announcement.
Codecov Report
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.23%. Comparing base (c17b3ee) to head (55d8097).
⚠️ Report is 1 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@ ## master #3673 +/- ## ======================================= Coverage 91.23% 91.23% ======================================= Files 185 185 Lines 16421 16421 ======================================= Hits 14982 14982 Misses 1254 1254 Partials 185 185
☔ View full report in Codecov by Sentry.
📢 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 I just checked both public and enterprise version documentation, and to be honest I didn't check is there any announcemen. But thank you for your confirmation!
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @zyfy29!
LGTM.
Merging.
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