From 7c38dae2492817251e79fc061df94b8bbf23ba28 Mon Sep 17 00:00:00 2001 From: Charlie Gerard Date: Tue, 11 Jun 2024 14:39:49 -0700 Subject: [PATCH] update create command --- lib/commands/fullscans/create.js | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/commands/fullscans/create.js b/lib/commands/fullscans/create.js index f8e83ac9..7ba4601a 100644 --- a/lib/commands/fullscans/create.js +++ b/lib/commands/fullscans/create.js @@ -34,29 +34,29 @@ export const create = { } const createFullScanFlags = prepareFlags({ - org: { - type: 'string', - shortFlag: 'o', - default: '', - description: 'Organization slug', - }, repo: { type: 'string', shortFlag: 'r', default: '', description: 'Repository name', }, + branch: { + type: 'string', + shortFlag: 'b', + default: '', + description: 'Branch name', + }, commitMessage: { type: 'string', shortFlag: 'm', default: '', description: 'Commit message', }, - branch: { + committers: { type: 'string', - shortFlag: 'b', + shortFlag: 'c', default: '', - description: 'Branch name', + description: 'Committers', }, defaultBranch: { type: 'boolean', @@ -85,6 +85,7 @@ const createFullScanFlags = prepareFlags({ * @property {string} orgSlug * @property {string} repoName * @property {string} branchName + * @property {string} committers * @property {string} commitMessage * @property {boolean} defaultBranch * @property {boolean} pendingHead @@ -118,19 +119,15 @@ async function setupCommand (name, description, argv, importMeta) { }) const { - org: orgSlug, repo: repoName, branch: branchName, commitMessage, defaultBranch, pendingHead, - tmp + tmp, + committers } = cli.flags - if (!orgSlug) { - throw new InputError('Please provide an organization slug') - } - if (!repoName) { throw new InputError('Please provide a repository name') } @@ -140,6 +137,8 @@ async function setupCommand (name, description, argv, importMeta) { return } + const orgSlug = cli.input[0] || '' + const cwd = process.cwd() const socketSdk = await setupSdk() const supportedFiles = await socketSdk.getReportSupportedFiles() @@ -162,7 +161,8 @@ async function setupCommand (name, description, argv, importMeta) { defaultBranch, pendingHead, tmp, - packagePaths + packagePaths, + committers } }