Skip to content

Conversation

zyfy29
Copy link
Contributor

@zyfy29 zyfy29 commented Aug 12, 2025

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 Copilot AI review requested due to automatic review settings August 12, 2025 15:04
Copy link

@Copilot Copilot AI left a comment

Choose 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 gmlewis changed the title fix: replace 'organizations' with 'orgs' in api endpoints fix: Replace 'organizations' with 'orgs' in API endpoints Aug 12, 2025
@gmlewis
Copy link
Collaborator

gmlewis commented Aug 12, 2025

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)?

@gmlewis
Copy link
Collaborator

gmlewis commented Aug 12, 2025

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.

Copy link

codecov bot commented Aug 12, 2025

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.

@zyfy29
Copy link
Contributor Author

zyfy29 commented Aug 12, 2025

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

Copy link
Collaborator

@gmlewis gmlewis left a comment

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.

@gmlewis gmlewis merged commit 0d45310 into google:master Aug 12, 2025
9 of 10 checks passed
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.

2 participants