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