-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
GitHub proxy: download GitHub server keys #50891
base: master
Are you sure you want to change the base?
Conversation
lib/srv/git/github.go
Outdated
} | ||
|
||
func (c *githubMetadataHTTPClient) fetchFingerprints() ([]string, string, error) { | ||
resp, err := http.Get(c.api) |
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.
Why not use https://pkg.go.dev/github.com/google/go-github/v68/github#MetaService.Get instead? This is something that we likely only need to refresh at most every 24 hours or so.
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.
it's a pretty simple get call so i would prefer not to import another package. i also like the idea doing If-None-Match.
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.
I think I'd rather use pre-existing package to lower the maintenance costs, but it is true an extra dependency of this size is not trivial.
4a2bedb
to
91a7bfd
Compare
e6f0ee3
to
7492d59
Compare
7492d59
to
c794c2f
Compare
Related: