Uh oh!
There was an error while loading. Please reload this page.
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
|
gmlewis
commented
Aug 22, 2023
Do you want to update all the files that mention |
WillAbides
commented
Aug 22, 2023
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
|
gmlewis
left a comment
There was a problem hiding this comment.
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. |
gmlewis
commented
Aug 27, 2023
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
roundTripperFuncfrom test code to prod because it was useful for creating the RoundTripper.