Skip to content

Commit

Permalink
update create command
Browse files Browse the repository at this point in the history
  • Loading branch information
charliegerard committed Jun 11, 2024
1 parent 3ab6362 commit 7c38dae
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions lib/commands/fullscans/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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')
}
Expand All @@ -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()
Expand All @@ -162,7 +161,8 @@ async function setupCommand (name, description, argv, importMeta) {
defaultBranch,
pendingHead,
tmp,
packagePaths
packagePaths,
committers
}
}

Expand Down

0 comments on commit 7c38dae

Please sign in to comment.