Builds the checkout pull request command.
(yargs: Argv)
| 13 | |
| 14 | /** Builds the checkout pull request command. */ |
| 15 | function builder(yargs: Argv) { |
| 16 | return addGithubTokenOption(yargs) |
| 17 | .positional('pr', { |
| 18 | type: 'number', |
| 19 | demandOption: true, |
| 20 | describe: 'The pull request number for the pull request to checkout', |
| 21 | }) |
| 22 | .option('takeover', { |
| 23 | type: 'boolean', |
| 24 | demandOption: false, |
| 25 | describe: 'Check out the pull request to perform a takeover', |
| 26 | }) |
| 27 | .option('target', { |
| 28 | type: 'string', |
| 29 | demandOption: false, |
| 30 | describe: 'Check out the pull request targeting the specified base branch', |
| 31 | }); |
| 32 | } |
| 33 | |
| 34 | /** Handles the checkout pull request command. */ |
| 35 | async function handler({pr, takeover, target}: Arguments<CheckoutPullRequestParams>) { |
nothing calls this directly
no test coverage detected