Closed clcollins closed 4 months ago
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: clcollins
The full list of commands accepted by this bot can be found here.
The pull request process is described here
/lgtm
@clcollins: all tests passed!
Full PR test history. Your PR dashboard.
The function
auth.TokenForHost()
assumes a string argument to properly identify the token lookup method for the host. Due to a bug(?) in the auth package, if an empty string is provided, it ends up looking for GitHub Enterprise credentials, and returns an empty token if it doesn't find them. Since we're assuming the token is provided either in thegh
config or theGH_TOKEN
env, when it is using the latter, calls to GitHub are not authenticated.This PR uses "github.com" as the string for
auth.TokenForHost()
, to ensure credentials (includingGH_TOKEN
) are properly retrieved from the environment.I have confirmed this to work with a container image build testing
backplane-tools install all
, and checking the rate limit,x-ratelimit-used
has only incremented by one (which is the call to check the limit itself) after a full backplane-tools install run.Signed-off-by: Chris Collins collins.christopher@gmail.com