chore: Use ReuseTokenSource in NewApplicationTokenSource#22
Merged
Conversation
Updated NewApplicationTokenSource to return an oauth2.ReuseTokenSource instead of the raw token source. This change improves token reuse and caching behavior.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #22 +/- ##
=======================================
Coverage 94.28% 94.28%
=======================================
Files 2 2
Lines 140 140
=======================================
Hits 132 132
Misses 6 6
Partials 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Added comments to NewApplicationTokenSource and NewInstallationTokenSource explaining that the returned token sources are wrapped in oauth2.ReuseTokenSource to prevent unnecessary token regeneration. This helps users understand the internal behavior and avoid redundant wrapping.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated NewApplicationTokenSource to return an oauth2.ReuseTokenSource instead of the raw token source. This change improves token reuse and caching behavior.
Description
Briefly describe the changes in this PR. What problem does it solve or what feature does it add?
Type of Change
Please delete options that are not relevant.
Testing
Documentation
Checklist
Screenshots (if applicable)
If your changes include visual elements, please add screenshots here.
Related Issues
Closes #(issue number)
Additional Notes
Add any other context about the pull request here.