Skip to content

Commit ba412cd

Browse files
committed
State id is optional
1 parent 90e32de commit ba412cd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/wrapper/CxWrapper.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,11 @@ export class CxWrapper {
201201
}
202202

203203
async triageUpdate(projectId: string, similarityId: string, scanType: string, state: string, comment: string, severity: string, stateId = ""): Promise<CxCommandOutput> {
204-
const commands: string[] = [CxConstants.CMD_TRIAGE, CxConstants.SUB_CMD_UPDATE, CxConstants.PROJECT_ID, projectId, CxConstants.SIMILARITY_ID, similarityId, CxConstants.SCAN_TYPES_SUB_CMD, scanType, CxConstants.STATE, state, CxConstants.STATE_ID, stateId, CxConstants.COMMENT, comment, CxConstants.SEVERITY, severity];
204+
const commands: string[] = [CxConstants.CMD_TRIAGE, CxConstants.SUB_CMD_UPDATE, CxConstants.PROJECT_ID, projectId, CxConstants.SIMILARITY_ID, similarityId, CxConstants.SCAN_TYPES_SUB_CMD, scanType, CxConstants.STATE, state, CxConstants.COMMENT, comment, CxConstants.SEVERITY, severity];
205+
if(stateId) {
206+
commands.push(CxConstants.STATE_ID)
207+
commands.push(stateId)
208+
}
205209
commands.push(...this.initializeCommands(false));
206210
const exec = new ExecutionService();
207211
return await exec.executeCommands(this.config.pathToExecutable, commands);

0 commit comments

Comments
 (0)