Skip to content

Commit

Permalink
chore: description can be string
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Apr 29, 2020
1 parent 5cbc1c4 commit 25af50c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/config/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export interface RenovateConfig
baseBranches?: string[];
baseBranch?: string;
branchList?: string[];
description?: string[];
description?: string | string[];

errors?: ValidationMessage[];
extends?: string[];
Expand Down
4 changes: 3 additions & 1 deletion lib/workers/repository/onboarding/pr/config-description.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import is from '@sindresorhus/is/dist';
import { emojify } from '../../../../util/emoji';
import { logger } from '../../../../logger';
import { configFileNames } from '../../../../config/app-strings';
Expand All @@ -24,7 +25,8 @@ export function getScheduleDesc(config: RenovateConfig): string[] {
function getDescriptionArray(config: RenovateConfig): string[] {
logger.debug('getDescriptionArray()');
logger.trace({ config });
return (config.description || []).concat(getScheduleDesc(config));
const desc = is.nonEmptyArray(config.description) ? config.description : [];
return desc.concat(getScheduleDesc(config));
}

export function getConfigDesc(
Expand Down

0 comments on commit 25af50c

Please sign in to comment.