|
1 | 1 | import { runBranchesAll, runBranchesDefault, runBranchesUpdateDefault } from './branches.js'; |
2 | 2 | import { runFeatureFlagsGet, runFeatureFlagsUpdate } from './feature-flags.js'; |
| 3 | +import { runAnalysisFeatureFlagsGet, runAnalysisFeatureFlagsUpdate } from './analysis-feature-flags.js'; |
3 | 4 |
|
4 | 5 | /** |
5 | 6 | * Register all `codeant settings <verb>` subcommands. |
@@ -59,4 +60,19 @@ export default function registerSettingsCommands(program, { runCmd }) { |
59 | 60 | .requiredOption('--flags <json>', 'Feature flags as a JSON string (e.g. \'{"pr_review":"enable"}\')') |
60 | 61 | .option('--v2', 'Use v2 feature flags', false) |
61 | 62 | .action((opts) => runCmd(() => runFeatureFlagsUpdate({ repo: opts.repo, flags: opts.flags, v2: opts.v2 }))); |
| 63 | + |
| 64 | + // ── analysis feature-flags get ───────────────────────────────────────────── |
| 65 | + settings |
| 66 | + .command('analysis-feature-flags-get') |
| 67 | + .description('Get analysis feature flags for a repository') |
| 68 | + .requiredOption('--repo <repo>', 'Repository (owner/repo)') |
| 69 | + .action((opts) => runCmd(() => runAnalysisFeatureFlagsGet({ repo: opts.repo }))); |
| 70 | + |
| 71 | + // ── analysis feature-flags update ───────────────────────────────────────── |
| 72 | + settings |
| 73 | + .command('analysis-feature-flags-update') |
| 74 | + .description('Update analysis feature flags for a repository') |
| 75 | + .requiredOption('--repo <repo>', 'Repository (owner/repo)') |
| 76 | + .requiredOption('--flags <json>', 'Feature flags as a JSON string (e.g. \'{"sast_analysis":"enabled"}\')') |
| 77 | + .action((opts) => runCmd(() => runAnalysisFeatureFlagsUpdate({ repo: opts.repo, flags: opts.flags }))); |
62 | 78 | } |
0 commit comments