Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correct endpoints for custom roles #2370

Merged
merged 2 commits into from
May 23, 2022
Merged

fix: correct endpoints for custom roles #2370

merged 2 commits into from
May 23, 2022

Conversation

joshua-hancox
Copy link
Contributor

@joshua-hancox joshua-hancox commented May 23, 2022

This function was created based on the docs here:
https://docs.github.com/en/rest/orgs/custom-roles#list-custom-repository-roles-in-an-organization

The docs incorrectly give the endpoint https://api.github.com/organizations/ORGANIZATION_ID/custom_roles.

When using this function, I get a 404.

The correct endpoint for the custom_roles endpoint is https://api.github.com/orgs/ORGANIZATION_ID/custom_roles - and this is consistent with other github endpoints under orgs. I have raised a support ticket with github, but I would expect them to change the documentation, not the api endpoint.

Also changed the file names for consistency.

@google-cla
Copy link

google-cla bot commented May 23, 2022

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

For more information, open the CLA check for this pull request.

@joshua-hancox
Copy link
Contributor Author

Hey both @gmlewis @tamboliasir1!

Could you take a look at this change for me when you get a second please?

@codecov
Copy link

codecov bot commented May 23, 2022

Codecov Report

Merging #2370 (f08b039) into master (0cf45d2) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #2370   +/-   ##
=======================================
  Coverage   98.06%   98.06%           
=======================================
  Files         119      119           
  Lines       10545    10545           
=======================================
  Hits        10341    10341           
  Misses        140      140           
  Partials       64       64           
Impacted Files Coverage Δ
github/orgs_custom_roles.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0cf45d2...f08b039. Read the comment docs.

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, @joshuahancox !
LGTM.
Merging.

@gmlewis gmlewis merged commit 6931fad into google:master May 23, 2022
@joshua-hancox joshua-hancox deleted the correct-endpoints branch May 23, 2022 12:46
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