Skip to content

PythonCoderAS/get-github-token

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

@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.

About

Get a github token from multiple locations.

Resources

License

Stars

Watchers

Forks

Packages

No packages published