fix(dev-infra): handle no caretaker config being defined (#38862)

Properly handle cases where no caretaker config is provided to ng-dev commands

PR Close #38862
This commit is contained in:
Joey Perrott 2020-09-15 15:38:29 -07:00 committed by Andrew Kushnir
parent 5614258cc7
commit 722699fb0c
1 changed files with 2 additions and 8 deletions

View File

@ -13,15 +13,9 @@ import {GitClient} from '../../utils/git';
import {CaretakerConfig} from '../config';
interface GithubInfoQuery {
[key: string]: {
issueCount: number,
};
}
/** Retrieve the number of matching issues for each github query. */
export async function printGithubTasks(git: GitClient, config: CaretakerConfig) {
if (!config.githubQueries?.length) {
export async function printGithubTasks(git: GitClient, config?: CaretakerConfig) {
if (!config?.githubQueries?.length) {
debug('No github queries defined in the configuration, skipping.');
return;
}