From c0026ff1c9a58b84bb892a3ee7f13bce27285c8f Mon Sep 17 00:00:00 2001 From: Tobias Bieniek <tobias@bieniek.cloud> Date: Tue, 8 Sep 2020 13:20:17 +0200 Subject: [PATCH] fix: changelog: Fix `files.length` conditions (#7210) Co-authored-by: Michael Kriese <michael.kriese@visualon.de> --- lib/workers/pr/changelog/github/index.ts | 2 +- lib/workers/pr/changelog/gitlab/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/workers/pr/changelog/github/index.ts b/lib/workers/pr/changelog/github/index.ts index a59bb69e7e..5760c4d7f9 100644 --- a/lib/workers/pr/changelog/github/index.ts +++ b/lib/workers/pr/changelog/github/index.ts @@ -70,7 +70,7 @@ export async function getReleaseNotesMd( } const { path: changelogFile, sha } = files.shift(); /* istanbul ignore if */ - if (files.length > 1) { + if (files.length !== 0) { logger.debug( `Multiple candidates for changelog file, using ${changelogFile}` ); diff --git a/lib/workers/pr/changelog/gitlab/index.ts b/lib/workers/pr/changelog/gitlab/index.ts index ff858d289c..211864d446 100644 --- a/lib/workers/pr/changelog/gitlab/index.ts +++ b/lib/workers/pr/changelog/gitlab/index.ts @@ -68,7 +68,7 @@ export async function getReleaseNotesMd( } const { path: changelogFile, id } = files.shift(); /* istanbul ignore if */ - if (files.length > 1) { + if (files.length !== 0) { logger.debug( `Multiple candidates for changelog file, using ${changelogFile}` ); -- GitLab