remove unused arguments

This commit is contained in:
Robert Brignull 2020-08-11 13:56:23 +01:00
parent 34b372292b
commit cf08f5a9cd
8 changed files with 11 additions and 30 deletions

5
lib/cli.js generated
View file

@ -39,16 +39,13 @@ program
.requiredOption('--repository <repository>', 'Repository name')
.requiredOption('--commit <commit>', 'SHA of commit that was analyzed')
.requiredOption('--ref <ref>', 'Name of ref that was analyzed')
.requiredOption('--analysis-key <key>', 'Identifies the analysis, for use matching up equivalent analyses on different commits')
.requiredOption('--github-url <url>', 'URL of GitHub instance')
.requiredOption('--github-auth <auth>', 'GitHub Apps token, or of the form "username:token" if using a personal access token')
.option('--checkout-path <path>', 'Checkout path (default: current working directory)')
.option('--analysis-name <name>', 'Display name of the analysis (default: same as analysis-key')
.option('--environment <env>', 'Environment (default: empty)')
.action(async (cmd) => {
const logger = logging_1.getCLILogger();
try {
await upload_lib.upload(cmd.sarifFile, repository_1.parseRepositoryNwo(cmd.repository), cmd.commit, cmd.ref, cmd.analysisKey, cmd.analysisName || cmd.analysisKey, undefined, cmd.checkoutPath || process.cwd(), cmd.environment, cmd.githubAuth, parseGithubApiUrl(cmd.githubUrl), 'cli', logger);
await upload_lib.upload(cmd.sarifFile, repository_1.parseRepositoryNwo(cmd.repository), cmd.commit, cmd.ref, undefined, undefined, undefined, cmd.checkoutPath || process.cwd(), undefined, cmd.githubAuth, parseGithubApiUrl(cmd.githubUrl), 'cli', logger);
}
catch (e) {
logger.error("Upload failed");