MCPcopy Create free account
hub / github.com/angular/dev-infra / builder

Function builder

ng-dev/pr/merge/cli.ts:25–55  ·  view source on GitHub ↗

Builds the command.

(argv: Argv)

Source from the content-addressed store, hash-verified

23
24/** Builds the command. */
25async 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. */
58async function handler({

Callers

nothing calls this directly

Calls 3

addDryRunFlagFunction · 0.85
addGithubTokenOptionFunction · 0.85
parsePrNumberFunction · 0.85

Tested by

no test coverage detected