@@ -2,6 +2,11 @@ import { runBranchesAll, runBranchesDefault, runBranchesUpdateDefault } from './
22import { runFeatureFlagsGet , runFeatureFlagsUpdate } from './feature-flags.js' ;
33import { runAnalysisFeatureFlagsGet , runAnalysisFeatureFlagsUpdate } from './analysis-feature-flags.js' ;
44import { runPrInstructionsGet , runPrInstructionsSave , runPrInstructionsEdit , runPrInstructionsDelete } from './pr-instructions.js' ;
5+ import { runSlackChannels , runSlackChannelGet } from './slack.js' ;
6+ import { runTeamsChannels , runTeamsChannelGet } from './teams.js' ;
7+ import { runRecurringScanslist , runRecurringScansCreate , runRecurringScansUpdate } from './recurring-scans.js' ;
8+ import { runSprintReportsList , runSprintReportsCreate , runSprintReportsUpdate } from './sprint-reports.js' ;
9+ import { runCveReportingList , runCveReportingCreate , runCveReportingUpdate } from './cve-reporting.js' ;
510
611/**
712 * Register all `codeant settings <verb>` subcommands.
@@ -128,4 +133,181 @@ export default function registerSettingsCommands(program, { runCmd }) {
128133 instructionType : opts . type ,
129134 instructionId : opts . instructionId ,
130135 } ) ) ) ;
136+
137+ // ── slack channels ─────────────────────────────────────────────────────────
138+ settings
139+ . command ( 'slack-channels' )
140+ . description ( 'List all available Slack channels' )
141+ . action ( ( ) => runCmd ( ( ) => runSlackChannels ( ) ) ) ;
142+
143+ // ── slack channel get ──────────────────────────────────────────────────────
144+ settings
145+ . command ( 'slack-channel-get' )
146+ . description ( 'Get saved Slack channel configuration' )
147+ . action ( ( ) => runCmd ( ( ) => runSlackChannelGet ( ) ) ) ;
148+
149+ // ── teams channels ─────────────────────────────────────────────────────────
150+ settings
151+ . command ( 'teams-channels' )
152+ . description ( 'List all available Microsoft Teams channels' )
153+ . action ( ( ) => runCmd ( ( ) => runTeamsChannels ( ) ) ) ;
154+
155+ // ── teams channel get ──────────────────────────────────────────────────────
156+ settings
157+ . command ( 'teams-channel-get' )
158+ . description ( 'Get saved Microsoft Teams channel configuration' )
159+ . action ( ( ) => runCmd ( ( ) => runTeamsChannelGet ( ) ) ) ;
160+
161+ // ── recurring-scans list ───────────────────────────────────────────────────
162+ settings
163+ . command ( 'recurring-scans-list' )
164+ . description ( 'List recurring scan schedules' )
165+ . option ( '--repo <repo>' , 'Filter by repository (owner/repo)' )
166+ . option ( '--status <status>' , 'Filter by status (e.g. ACTIVE)' )
167+ . option ( '--schedule-id <id>' , 'Filter by schedule ID' )
168+ . action ( ( opts ) => runCmd ( ( ) => runRecurringScanslist ( { repo : opts . repo , status : opts . status , scheduleId : opts . scheduleId } ) ) ) ;
169+
170+ // ── recurring-scans create ─────────────────────────────────────────────────
171+ settings
172+ . command ( 'recurring-scans-create' )
173+ . description ( 'Create a recurring scan schedule' )
174+ . requiredOption ( '--name <name>' , 'Schedule name' )
175+ . option ( '--repo <repo>' , 'Repository (owner/repo)' )
176+ . option ( '--schedule-config <json>' , 'Schedule config as JSON (e.g. \'{"frequency":"weekly"}\')' )
177+ . option ( '--scan-config <json>' , 'Scan config as JSON' )
178+ . option ( '--description <text>' , 'Description' )
179+ . option ( '--notification-config <json>' , 'Notification config as JSON' )
180+ . option ( '--created-by <user>' , 'Creator identifier' )
181+ . action ( ( opts ) => runCmd ( ( ) => runRecurringScansCreate ( {
182+ name : opts . name ,
183+ repo : opts . repo ,
184+ scheduleConfig : opts . scheduleConfig ,
185+ scanConfig : opts . scanConfig ,
186+ description : opts . description ,
187+ notificationConfig : opts . notificationConfig ,
188+ createdBy : opts . createdBy ,
189+ } ) ) ) ;
190+
191+ // ── recurring-scans update ─────────────────────────────────────────────────
192+ settings
193+ . command ( 'recurring-scans-update' )
194+ . description ( 'Update a recurring scan schedule' )
195+ . requiredOption ( '--schedule-id <id>' , 'Schedule ID to update' )
196+ . option ( '--status <status>' , 'New status (e.g. ACTIVE, INACTIVE)' )
197+ . option ( '--name <name>' , 'New name' )
198+ . option ( '--description <text>' , 'New description' )
199+ . option ( '--schedule-config <json>' , 'Schedule config as JSON' )
200+ . option ( '--scan-config <json>' , 'Scan config as JSON' )
201+ . option ( '--notification-config <json>' , 'Notification config as JSON' )
202+ . action ( ( opts ) => runCmd ( ( ) => runRecurringScansUpdate ( {
203+ scheduleId : opts . scheduleId ,
204+ status : opts . status ,
205+ name : opts . name ,
206+ description : opts . description ,
207+ scheduleConfig : opts . scheduleConfig ,
208+ scanConfig : opts . scanConfig ,
209+ notificationConfig : opts . notificationConfig ,
210+ } ) ) ) ;
211+
212+ // ── sprint-reports list ────────────────────────────────────────────────────
213+ settings
214+ . command ( 'sprint-reports-list' )
215+ . description ( 'List sprint report configurations' )
216+ . option ( '--repo <repo>' , 'Filter by repository (owner/repo)' )
217+ . option ( '--status <status>' , 'Filter by status (e.g. ACTIVE)' )
218+ . option ( '--config-id <id>' , 'Filter by config ID' )
219+ . action ( ( opts ) => runCmd ( ( ) => runSprintReportsList ( { repo : opts . repo , status : opts . status , configId : opts . configId } ) ) ) ;
220+
221+ // ── sprint-reports create ──────────────────────────────────────────────────
222+ settings
223+ . command ( 'sprint-reports-create' )
224+ . description ( 'Create a sprint report configuration' )
225+ . requiredOption ( '--name <name>' , 'Report name' )
226+ . option ( '--repo <repo>' , 'Repository (owner/repo)' )
227+ . option ( '--schedule-config <json>' , 'Schedule config as JSON (e.g. \'{"frequency":"weekly"}\')' )
228+ . option ( '--report-config <json>' , 'Report config as JSON' )
229+ . option ( '--description <text>' , 'Description' )
230+ . option ( '--notification-config <json>' , 'Notification config as JSON' )
231+ . option ( '--created-by <user>' , 'Creator identifier' )
232+ . action ( ( opts ) => runCmd ( ( ) => runSprintReportsCreate ( {
233+ name : opts . name ,
234+ repo : opts . repo ,
235+ scheduleConfig : opts . scheduleConfig ,
236+ reportConfig : opts . reportConfig ,
237+ description : opts . description ,
238+ notificationConfig : opts . notificationConfig ,
239+ createdBy : opts . createdBy ,
240+ } ) ) ) ;
241+
242+ // ── sprint-reports update ──────────────────────────────────────────────────
243+ settings
244+ . command ( 'sprint-reports-update' )
245+ . description ( 'Update a sprint report configuration' )
246+ . requiredOption ( '--config-id <id>' , 'Config ID to update' )
247+ . option ( '--status <status>' , 'New status (e.g. ACTIVE, INACTIVE)' )
248+ . option ( '--name <name>' , 'New name' )
249+ . option ( '--description <text>' , 'New description' )
250+ . option ( '--schedule-config <json>' , 'Schedule config as JSON' )
251+ . option ( '--report-config <json>' , 'Report config as JSON' )
252+ . option ( '--notification-config <json>' , 'Notification config as JSON' )
253+ . action ( ( opts ) => runCmd ( ( ) => runSprintReportsUpdate ( {
254+ configId : opts . configId ,
255+ status : opts . status ,
256+ name : opts . name ,
257+ description : opts . description ,
258+ scheduleConfig : opts . scheduleConfig ,
259+ reportConfig : opts . reportConfig ,
260+ notificationConfig : opts . notificationConfig ,
261+ } ) ) ) ;
262+
263+ // ── cve-reporting list ─────────────────────────────────────────────────────
264+ settings
265+ . command ( 'cve-reporting-list' )
266+ . description ( 'List CVE report configurations' )
267+ . option ( '--repo <repo>' , 'Filter by repository (owner/repo)' )
268+ . option ( '--status <status>' , 'Filter by status (e.g. ACTIVE)' )
269+ . option ( '--report-id <id>' , 'Filter by report ID' )
270+ . action ( ( opts ) => runCmd ( ( ) => runCveReportingList ( { repo : opts . repo , status : opts . status , reportId : opts . reportId } ) ) ) ;
271+
272+ // ── cve-reporting create ───────────────────────────────────────────────────
273+ settings
274+ . command ( 'cve-reporting-create' )
275+ . description ( 'Create a CVE report configuration' )
276+ . requiredOption ( '--name <name>' , 'Report name' )
277+ . option ( '--repo <repo>' , 'Repository (owner/repo)' )
278+ . option ( '--schedule-config <json>' , 'Schedule config as JSON (e.g. \'{"frequency":"weekly"}\')' )
279+ . option ( '--report-config <json>' , 'Report config as JSON' )
280+ . option ( '--description <text>' , 'Description' )
281+ . option ( '--notification-config <json>' , 'Notification config as JSON' )
282+ . option ( '--created-by <user>' , 'Creator identifier' )
283+ . action ( ( opts ) => runCmd ( ( ) => runCveReportingCreate ( {
284+ name : opts . name ,
285+ repo : opts . repo ,
286+ scheduleConfig : opts . scheduleConfig ,
287+ reportConfig : opts . reportConfig ,
288+ description : opts . description ,
289+ notificationConfig : opts . notificationConfig ,
290+ createdBy : opts . createdBy ,
291+ } ) ) ) ;
292+
293+ // ── cve-reporting update ───────────────────────────────────────────────────
294+ settings
295+ . command ( 'cve-reporting-update' )
296+ . description ( 'Update a CVE report configuration' )
297+ . requiredOption ( '--report-id <id>' , 'Report ID to update' )
298+ . option ( '--status <status>' , 'New status (e.g. ACTIVE, INACTIVE)' )
299+ . option ( '--name <name>' , 'New name' )
300+ . option ( '--description <text>' , 'New description' )
301+ . option ( '--schedule-config <json>' , 'Schedule config as JSON' )
302+ . option ( '--report-config <json>' , 'Report config as JSON' )
303+ . option ( '--notification-config <json>' , 'Notification config as JSON' )
304+ . action ( ( opts ) => runCmd ( ( ) => runCveReportingUpdate ( {
305+ reportId : opts . reportId ,
306+ status : opts . status ,
307+ name : opts . name ,
308+ description : opts . description ,
309+ scheduleConfig : opts . scheduleConfig ,
310+ reportConfig : opts . reportConfig ,
311+ notificationConfig : opts . notificationConfig ,
312+ } ) ) ) ;
131313}
0 commit comments