feat: Add Credentials Revoke API by cointem · Pull Request #3847 · google/go-github
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
CredentialsServiceto the client, allowing users to revoke a list of credentials (tokens) through the newRevokemethod ingithub/credentials.go. - Registered
CredentialsServicein theClientstruct and initialized it in the client setup, ensuring it is available for use. [1] [2]
Testing Improvements:
- Added a new test
TestCredentialsService_Revokeingithub/credentials_test.goto verify correct request formation, response handling, and error cases for credential revocation.