Introduce external repository token

This commit is contained in:
Robert 2021-01-04 12:31:55 +00:00
parent a0c4707dcc
commit 90d1a31dd4
22 changed files with 72 additions and 41 deletions

View file

@ -96,6 +96,7 @@ interface InitArgs {
repository: string;
githubUrl: string;
githubAuth: string;
externalRepositoryToken: string | undefined;
debug: boolean;
}
@ -108,6 +109,10 @@ program
"--github-auth <auth>",
"GitHub Apps token or personal access token. (Required)"
)
.option(
"--external-repository-token <token>",
"A token for fetching external config files and queries if they reside in a private repository."
)
.option(
"--languages <languages>",
"Comma-separated list of languages to analyze. Otherwise detects and analyzes all supported languages from the repo."
@ -150,6 +155,7 @@ program
const apiDetails = {
auth: cmd.githubAuth,
externalRepoAuth: cmd.externalRepositoryToken ?? cmd.githubAuth,
url: parseGithubUrl(cmd.githubUrl),
};