From 722699fb0c2744204c808b8c77d84e488b1e2a60 Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Tue, 15 Sep 2020 15:38:29 -0700 Subject: [PATCH] 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 --- dev-infra/caretaker/check/github.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/dev-infra/caretaker/check/github.ts b/dev-infra/caretaker/check/github.ts index 5020c11531..7a5bee023a 100644 --- a/dev-infra/caretaker/check/github.ts +++ b/dev-infra/caretaker/check/github.ts @@ -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; }