Skip to content

Conversation

@cointem
Copy link
Contributor

@cointem cointem commented Nov 30, 2025

Fixes: #3846.

This pull request introduces a new service for managing credentials in the GitHub API client, specifically adding support for revoking credentials via the API. The changes include a new service implementation, comprehensive unit tests, and integration of the service into the main client.

New Credentials Service Integration:

  • Added the CredentialsService to the client, allowing users to revoke a list of credentials (tokens) through the new Revoke method in github/credentials.go.
  • Registered CredentialsService in the Client struct and initialized it in the client setup, ensuring it is available for use. [1] [2]

Testing Improvements:

  • Added a new test TestCredentialsService_Revoke in github/credentials_test.go to verify correct request formation, response handling, and error cases for credential revocation.

@google-cla
Copy link

google-cla bot commented Nov 30, 2025

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.

@cointem cointem force-pushed the feature/cred-revoke branch from 8d3e65f to b2b08fa Compare November 30, 2025 14:48
@gmlewis gmlewis changed the title feat: Add Credentials Revoke Api feat: Add Credentials Revoke API Nov 30, 2025
@codecov
Copy link

codecov bot commented Nov 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.43%. Comparing base (3afe183) to head (74ae15b).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3847   +/-   ##
=======================================
  Coverage   92.42%   92.43%           
=======================================
  Files         197      198    +1     
  Lines       14167    14175    +8     
=======================================
+ Hits        13094    13102    +8     
  Misses        884      884           
  Partials      189      189           

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

@cointem
Copy link
Contributor Author

cointem commented Dec 1, 2025

refs #3846

@gmlewis gmlewis added the NeedsReview PR is awaiting a review before merging. label Dec 1, 2025
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, @cointem!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.

cc: @stevehipwell - @alexandear - @zyfy29

@cointem cointem requested a review from alexandear December 1, 2025 17:07
@cointem cointem requested a review from alexandear December 1, 2025 17:26
@gmlewis gmlewis removed the NeedsReview PR is awaiting a review before merging. label Dec 1, 2025
@gmlewis
Copy link
Collaborator

gmlewis commented Dec 1, 2025

Thank you, @alexandear!
Merging.

@gmlewis gmlewis merged commit 7db3132 into google:master Dec 1, 2025
7 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.

Implement credentials revoke Api

3 participants