Builds the command.
(argv: Argv)
| 23 | } |
| 24 | |
| 25 | /** Builds the command. */ |
| 26 | async function builder(argv: Argv) { |
| 27 | return addDryRunFlag(addGithubTokenOption(argv)) |
| 28 | .help() |
| 29 | .strict() |
| 30 | .positional('prs', { |
| 31 | alias: 'pr', |
| 32 | demandOption: true, |
| 33 | coerce: (prs: (string | number)[]) => |
| 34 | (Array.isArray(prs) ? prs : [prs]) |
| 35 | .flatMap((pr) => String(pr).split(',')) |
| 36 | .map((pr) => pr.trim()) |
| 37 | .filter(Boolean) |
| 38 | .map((pr) => parsePrNumber(pr)), |
| 39 | type: 'string', |
| 40 | array: true, |
| 41 | description: 'The PR(s) to be merged.', |
| 42 | }) |
| 43 | .option('branch-prompt' as 'branchPrompt', { |
| 44 | type: 'boolean', |
| 45 | default: true, |
| 46 | description: 'Whether to prompt to confirm the branches a PR will merge into.', |
| 47 | }) |
| 48 | .option('force-manual-branches' as 'forceManualBranches', { |
| 49 | type: 'boolean', |
| 50 | default: false, |
| 51 | description: 'Whether to manually select the branches you wish to merge the PR into.', |
| 52 | }) |
| 53 | .option('ignore-pending-reviews' as 'ignorePendingReviews', { |
| 54 | type: 'boolean', |
| 55 | default: false, |
| 56 | description: 'Bypass the check for pending reviews on the pull request', |
| 57 | }) |
| 58 | .option('wait-for-validations' as 'waitForValidations', { |
nothing calls this directly
no test coverage detected