Skip to content

Commit 35107d5

Browse files
committed
fixes
1 parent 185634a commit 35107d5

4 files changed

Lines changed: 13 additions & 4 deletions

File tree

src/commands/settings/cve-reporting.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,15 @@ export async function runCveReportingCreate({ name, repo, scheduleConfig, report
2121
});
2222
}
2323

24-
export async function runCveReportingUpdate({ reportId, status, name, description, scheduleConfig, reportConfig, notificationConfig } = {}) {
24+
export async function runCveReportingUpdate({ reportId, repo, status, name, description, scheduleConfig, reportConfig, notificationConfig } = {}) {
2525
if (!reportId) {
2626
const err = new Error('--report-id is required');
2727
err.exitCode = 1;
2828
throw err;
2929
}
3030
return fetchApi('/extension/analysis/cve-reporting/update', 'POST', {
3131
report_id: reportId,
32+
repo,
3233
status,
3334
name,
3435
description,

src/commands/settings/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export default function registerSettingsCommands(program, { runCmd }) {
113113
settings
114114
.command('pr-instructions-get')
115115
.description('Get PR review instructions')
116-
.option('--type <type>', 'Instruction type (e.g. custom)')
116+
.requiredOption('--type <type>', 'Instruction type (e.g. custom)')
117117
.action((opts) => runCmd(() => runPrInstructionsGet({ instructionsType: opts.type })));
118118

119119
// ── pr-instructions save ───────────────────────────────────────────────────
@@ -196,6 +196,7 @@ export default function registerSettingsCommands(program, { runCmd }) {
196196
.command('recurring-scans-update')
197197
.description('Update a recurring scan schedule')
198198
.requiredOption('--schedule-id <id>', 'Schedule ID to update')
199+
.requiredOption('--repo <repo>', 'Repository (owner/repo)')
199200
.option('--status <status>', 'New status (e.g. ACTIVE, INACTIVE)')
200201
.option('--name <name>', 'New name')
201202
.option('--description <text>', 'New description')
@@ -204,6 +205,7 @@ export default function registerSettingsCommands(program, { runCmd }) {
204205
.option('--notification-config <json>', 'Notification config as JSON')
205206
.action((opts) => runCmd(() => runRecurringScansUpdate({
206207
scheduleId: opts.scheduleId,
208+
repo: opts.repo,
207209
status: opts.status,
208210
name: opts.name,
209211
description: opts.description,
@@ -247,6 +249,7 @@ export default function registerSettingsCommands(program, { runCmd }) {
247249
.command('sprint-reports-update')
248250
.description('Update a sprint report configuration')
249251
.requiredOption('--config-id <id>', 'Config ID to update')
252+
.requiredOption('--repo <repo>', 'Repository (owner/repo)')
250253
.option('--status <status>', 'New status (e.g. ACTIVE, INACTIVE)')
251254
.option('--name <name>', 'New name')
252255
.option('--description <text>', 'New description')
@@ -255,6 +258,7 @@ export default function registerSettingsCommands(program, { runCmd }) {
255258
.option('--notification-config <json>', 'Notification config as JSON')
256259
.action((opts) => runCmd(() => runSprintReportsUpdate({
257260
configId: opts.configId,
261+
repo: opts.repo,
258262
status: opts.status,
259263
name: opts.name,
260264
description: opts.description,
@@ -298,6 +302,7 @@ export default function registerSettingsCommands(program, { runCmd }) {
298302
.command('cve-reporting-update')
299303
.description('Update a CVE report configuration')
300304
.requiredOption('--report-id <id>', 'Report ID to update')
305+
.requiredOption('--repo <repo>', 'Repository (owner/repo)')
301306
.option('--status <status>', 'New status (e.g. ACTIVE, INACTIVE)')
302307
.option('--name <name>', 'New name')
303308
.option('--description <text>', 'New description')
@@ -306,6 +311,7 @@ export default function registerSettingsCommands(program, { runCmd }) {
306311
.option('--notification-config <json>', 'Notification config as JSON')
307312
.action((opts) => runCmd(() => runCveReportingUpdate({
308313
reportId: opts.reportId,
314+
repo: opts.repo,
309315
status: opts.status,
310316
name: opts.name,
311317
description: opts.description,

src/commands/settings/recurring-scans.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,15 @@ export async function runRecurringScansCreate({ name, repo, scheduleConfig, scan
2121
});
2222
}
2323

24-
export async function runRecurringScansUpdate({ scheduleId, status, name, description, scheduleConfig, scanConfig, notificationConfig } = {}) {
24+
export async function runRecurringScansUpdate({ scheduleId, repo, status, name, description, scheduleConfig, scanConfig, notificationConfig } = {}) {
2525
if (!scheduleId) {
2626
const err = new Error('--schedule-id is required');
2727
err.exitCode = 1;
2828
throw err;
2929
}
3030
return fetchApi('/extension/analysis/recurring-scans/update', 'POST', {
3131
schedule_id: scheduleId,
32+
repo,
3233
status,
3334
name,
3435
description,

src/commands/settings/sprint-reports.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,15 @@ export async function runSprintReportsCreate({ name, repo, scheduleConfig, repor
2121
});
2222
}
2323

24-
export async function runSprintReportsUpdate({ configId, status, name, description, scheduleConfig, reportConfig, notificationConfig } = {}) {
24+
export async function runSprintReportsUpdate({ configId, repo, status, name, description, scheduleConfig, reportConfig, notificationConfig } = {}) {
2525
if (!configId) {
2626
const err = new Error('--config-id is required');
2727
err.exitCode = 1;
2828
throw err;
2929
}
3030
return fetchApi('/extension/metrics/sprint-reports/update', 'POST', {
3131
config_id: configId,
32+
repo,
3233
status,
3334
name,
3435
description,

0 commit comments

Comments
 (0)