@pythoncoderas/get-github-token
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@pythoncoderas/get-github-token

Get a github token from multiple locations.

API

getToken(tokenInput?: string | null, environmentVariableName = "GITHUB_TOKEN"): string | null

Gets a token from the environment or a command line argument.

Parameters

  • tokenInput?: string | null - The token input from the command line.
  • environmentVariableName: string - The environment variable name to check for a token. Defaults to GITHUB_TOKEN.

Returns: string | null - The token if found, otherwise returns null.

Readme

Keywords

none

Package Sidebar

Install

npm i @pythoncoderas/get-github-token

Weekly Downloads

12

Version

1.0.0

License

MIT

Unpacked Size

5.42 kB

Total Files

6

Last publish

Collaborators

  • pythoncoderas