[feat] Add a way to pass a GitHub authentication token to Blowdryer - #81
Open
glektarssza wants to merge 2 commits into
Open
[feat] Add a way to pass a GitHub authentication token to Blowdryer#81glektarssza wants to merge 2 commits into
glektarssza wants to merge 2 commits into
Conversation
This lets developers get past GitHub's rate limiting for unauthenticated users.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
As said in the title, added a way to pass a GitHub Personal Access Token (PAT) to Blowdryer.
This lets developers get past GitHub's rate limiting for unauthenticated users.
I ran into this situation today while trying to test GTNewHorizons/FindIt#34.
As you can see, Gradle is failing because GitHub is refusing to let me access the
.importorderfile from the shared configuration file repository due to the rate limiting imposed on unauthenticated users.From GitHub's docs, this rate limit is 60 requests per hour for the REST API, which I think also applies to things fetched from their
raw.githubusercontent.comdomain too (though I'm not 100% sure on this).Users who authenticate with some kind of access token are given a much higher rate limit. Blowdryer supports this via the
authTokenAPI on theGitHubobject.This PR adds a new setting called
gtnh.settings.blowdryerGitHubAuthToken. It defaults to an empty string. If it is not empty the value will be passed to theauthTokenmethod on the retrieved BlowdryerGitHubobject as the value to use for authentication with GitHub's APIs.Testing
Checklist