|
1 | 1 | import { runBranchesAll, runBranchesDefault, runBranchesUpdateDefault } from './branches.js'; |
| 2 | +import { runFeatureFlagsGet, runFeatureFlagsUpdate } from './feature-flags.js'; |
2 | 3 |
|
3 | 4 | /** |
4 | 5 | * Register all `codeant settings <verb>` subcommands. |
@@ -41,4 +42,21 @@ export default function registerSettingsCommands(program, { runCmd }) { |
41 | 42 | .requiredOption('--repo <repo>', 'Repository (owner/repo)') |
42 | 43 | .requiredOption('--branch <name>', 'Branch name to set as default') |
43 | 44 | .action((opts) => runCmd(() => runBranchesUpdateDefault({ repo: opts.repo, branch: opts.branch }))); |
| 45 | + |
| 46 | + // ── feature-flags get ────────────────────────────────────────────────────── |
| 47 | + settings |
| 48 | + .command('feature-flags-get') |
| 49 | + .description('Get feature flags for a repository') |
| 50 | + .requiredOption('--repo <repo>', 'Repository (owner/repo)') |
| 51 | + .option('--v2', 'Use v2 feature flags', false) |
| 52 | + .action((opts) => runCmd(() => runFeatureFlagsGet({ repo: opts.repo, v2: opts.v2 }))); |
| 53 | + |
| 54 | + // ── feature-flags update ─────────────────────────────────────────────────── |
| 55 | + settings |
| 56 | + .command('feature-flags-update') |
| 57 | + .description('Update feature flags for a repository') |
| 58 | + .requiredOption('--repo <repo>', 'Repository (owner/repo)') |
| 59 | + .requiredOption('--flags <json>', 'Feature flags as a JSON string (e.g. \'{"pr_review":"enable"}\')') |
| 60 | + .option('--v2', 'Use v2 feature flags', false) |
| 61 | + .action((opts) => runCmd(() => runFeatureFlagsUpdate({ repo: opts.repo, flags: opts.flags, v2: opts.v2 }))); |
44 | 62 | } |
0 commit comments