-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Allow for alternative authentication mechanisms for the Octokit object on construction. #106
Comments
Looking at your linked PR, it looks like your use case is if you don't want to authenticate at all, right? I think I see a use case there, not sure if I see a use case for alternative auth methods - does that seem right? |
The use case I specifically am running into is needing to authentication with a JWT. |
I'm not sure whether we need to implement this. The toolkit class is a thin wrapper convenience function for the common case I could see the need if an input accepted a PAT or JWT and a function provided a single abstraction to do the right thing. Otherwise I would recommend using the Octokit class directly. Thoughts? |
IMHO, const octokit = new Octokit(getInput('token', { required: false }))
const ghkit = new github.GitHub(octokit) Moreover, it seems that the only addition of https://github.com/actions/toolkit/tree/master/packages/github is that it provides the context for the current action. Wouldn't it be easier if it did just that, instead of being a passthrough for all octokit features? |
fixed with #314 since the value of github.GitHub expanded to support runner proxy settings now you can use a different auth mechanism, but still get the proxy settings. |
Currently for the
@actions/github
this library extends@octokit/rest
'sOctokit
class and in thesuper
call assumes that the authentication is a standard token. (code link)Other authentication methods should be valid here as well.
The text was updated successfully, but these errors were encountered: