fix(dev-infra): add github token requirement for discover-new-conflicts (#41825)

Add the github token option/requirement for the pr discover-new-conflicts
command.

PR Close #41825
This commit is contained in:
Joey Perrott 2021-04-26 15:42:10 -07:00 committed by Jessica Janiuk
parent 3783976543
commit b1ae31c712
2 changed files with 3 additions and 2 deletions

View File

@ -3313,7 +3313,7 @@ function cleanUpGitState(previousBranchOrRevision) {
*/ */
/** Builds the discover-new-conflicts pull request command. */ /** Builds the discover-new-conflicts pull request command. */
function buildDiscoverNewConflictsCommand(yargs) { function buildDiscoverNewConflictsCommand(yargs) {
return yargs return addGithubTokenOption(yargs)
.option('date', { .option('date', {
description: 'Only consider PRs updated since provided date', description: 'Only consider PRs updated since provided date',
defaultDescription: '30 days ago', defaultDescription: '30 days ago',

View File

@ -9,6 +9,7 @@
import {Arguments, Argv} from 'yargs'; import {Arguments, Argv} from 'yargs';
import {error} from '../../utils/console'; import {error} from '../../utils/console';
import {addGithubTokenOption} from '../../utils/git/github-yargs';
import {discoverNewConflictsForPr} from './index'; import {discoverNewConflictsForPr} from './index';
@ -21,7 +22,7 @@ export interface DiscoverNewConflictsCommandOptions {
/** Builds the discover-new-conflicts pull request command. */ /** Builds the discover-new-conflicts pull request command. */
export function buildDiscoverNewConflictsCommand(yargs: Argv): export function buildDiscoverNewConflictsCommand(yargs: Argv):
Argv<DiscoverNewConflictsCommandOptions> { Argv<DiscoverNewConflictsCommandOptions> {
return yargs return addGithubTokenOption(yargs)
.option('date', { .option('date', {
description: 'Only consider PRs updated since provided date', description: 'Only consider PRs updated since provided date',
defaultDescription: '30 days ago', defaultDescription: '30 days ago',