-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Remove dependency on "golang.org/x/oauth2" #2895
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2895 +/- ##
=======================================
Coverage 98.10% 98.10%
=======================================
Files 142 142
Lines 12340 12347 +7
=======================================
+ Hits 12106 12113 +7
Misses 159 159
Partials 75 75
|
Do you want to update all the files that mention
|
These are the remaining oauth2 mentions:
The first three are docs and code comments about how to authenticate. I think it's appropriate to keep oauth2 there because go-github doesn't offer an Enterprise equivalent of
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally the maintainers perform the "go mod tidy", and we have been using "go mod tidy -compat=1.17" for a long while now.
But all the tests seem to be passing, so maybe we are still fine. This will be an experiment. 😄
Thank you, @WillAbides !
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
Doh, I gotcha. I misread that before, but now I understand. Thanks. |
Thank you, @gabriel-samfira ! |
Resolves #2893
This removes the primary module's dependency on "golang.org/x/oauth2" and replaces it with a RoundTripper that adds an "Authorization" header with the value "Bearer ".
TestNewTokenClient now does an http request and checks for the "Authorization" header.
I moved
roundTripperFunc
from test code to prod because it was useful for creating the RoundTripper.