-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add RepositoriesService.GetByID method. #332
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
Add RepositoriesService.GetByID method. #332
Conversation
Note: GetByID uses the undocumented GitHub API endpoint /repositories/:id. Include license preview Accept header. Helps #329.
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
@sqs, can you confirm you're okay with this commit being contributed to Google? |
👍 |
I confirm. |
@googlebot, can you check again? |
"need author consent" is a terminal CLA state. It will never automatically come out of this state; don't worry about it. |
Thanks! |
Thank you guys. This will actually be pretty useful inside Google as well, so I'm glad to see this added. |
Note: OrganizationService.GetByID uses the undocumented GitHub API endpoint /organizations/:id. Change all GetByID tests to fail early with t.Fatalf when error is returned. Updates google#329. Follows google#332 and google#333.
Note: GetByID uses the undocumented GitHub API endpoint
/repositories/:id
.Include license preview Accept header.
Helps #329.
This commit is based on https://github.com/sourcegraph/go-github/commit/da394ef1f53de34e9c3e5782ca27589df32b426c which has been tested in production. It has been amended by me to include Licences API header, improved documentation and commit message, with appropriate updates to the test.
I've tested it locally with the Licences API header to make sure it works, and I've confirmed that it did.