feat(dev-infra): tooling to check out pending PR (#38474)

Creates a tool within ng-dev to checkout a pending PR from the upstream repository.  This automates
an action that many developers on the Angular team need to do periodically in the process of testing
and reviewing incoming PRs.

Example usage:
  ng-dev pr checkout <pr-number>

PR Close #38474
This commit is contained in:
Joey Perrott
2020-08-14 16:49:07 -07:00
committed by Andrew Scott
parent aaa1d8e2fe
commit 63ba74fe4e
11 changed files with 261 additions and 56 deletions

View File

@ -8,6 +8,7 @@
import * as yargs from 'yargs';
import {CheckoutCommandModule} from './checkout/cli';
import {buildDiscoverNewConflictsCommand, handleDiscoverNewConflictsCommand} from './discover-new-conflicts/cli';
import {buildMergeCommand, handleMergeCommand} from './merge/cli';
import {buildRebaseCommand, handleRebaseCommand} from './rebase/cli';
@ -24,7 +25,8 @@ export function buildPrParser(localYargs: yargs.Argv) {
buildDiscoverNewConflictsCommand, handleDiscoverNewConflictsCommand)
.command(
'rebase <pr-number>', 'Rebase a pending PR and push the rebased commits back to Github',
buildRebaseCommand, handleRebaseCommand);
buildRebaseCommand, handleRebaseCommand)
.command(CheckoutCommandModule);
}
if (require.main === module) {