Uh oh!
There was an error while loading. Please reload this page.
Update package constructors - #2904
Conversation
Codecov Report
@@ Coverage Diff @@## master #2904 +/- ##
=======================================
Coverage 98.10% 98.11% =======================================
Files 142 142 Lines 12347 12385 +38 =======================================
+ Hits 12113 12151 +38
Misses 159 159 Partials 75 75
|
gmlewis
left a comment
There was a problem hiding this comment.
This looks great, @WillAbides !
Just a few minor nits, please, then we should be ready for a second LGTM+Approval from any other contributor to this repo before merging.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com>
WillAbides
commented
Aug 29, 2023
@gmlewis Updated with your suggestions. As an aside, is there a way to get a preview of what codecov is going to report before pushing? I looked for a way to run it locally, and it appears to require an API token and membership in the right org. |
gmlewis
commented
Aug 29, 2023
Not that I'm aware of. Sometimes, to get an idea of what it might report, I run this locally first: $ cat coverage-web.sh
#!/bin/bash -ex
go test -coverprofile=cover.out ./...
go tool cover -html cover.outbut it is obviously not the same. |
gmlewis
left a comment
There was a problem hiding this comment.
Awesome! Thank you, @WillAbides !
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
WillAbides
commented
Aug 29, 2023
I made a script to preview whether codecov will fail your PR: https://gist.github.com/WillAbides/e0bbffccb34d9922cecb2ab9d66defec |
gmlewis
commented
Aug 29, 2023
Thank you, @WillAbides ! That's fantastic! |
sridharavinash
left a comment
There was a problem hiding this comment.
LGTM! Thanks for the updates 💖 .
gmlewis
commented
Aug 31, 2023
Thank you, @sridharavinash ! |
google/go-github#2904 added support for bypassing github.com/x/oauth2. Use it.
google/go-github#2904 added support for bypassing github.com/x/oauth2. Use it.
Closes#2897
After experimenting with implementing #2897, I think this ends up with better usage for end users.
This deprecates
github.NewTokenClientandgithub.NewEnterpriseClientand replaces them withClient.WithAuthTokenandClient.WithEnterpriseURLs.Now you can create an authenticated client for an enterprise server with:
There is no need for users import
github.com/x/oauth2anymore.I opted for this implementation over my
WithOptionsproposal the error returned fromWithOptionsmeans that most uses of go-github would have an unnecessary error check.vs