From a3d1ae7d3ec959f06a1de3f41022b2360fd2e28c Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Thu, 25 Oct 2018 19:31:02 +0200 Subject: [PATCH] fix(changelog): remove trailing slash in changelog url MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This seems to fix #2219. It wasn’t RST. --- lib/workers/pr/changelog/source-github.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/workers/pr/changelog/source-github.js b/lib/workers/pr/changelog/source-github.js index 68455a5b5c..b59964ed48 100644 --- a/lib/workers/pr/changelog/source-github.js +++ b/lib/workers/pr/changelog/source-github.js @@ -62,9 +62,9 @@ async function getChangeLogJSON({ logger.debug('Repository URL does not match any hnown hosts'); return null; } - const repository = pathname.slice(1); + const repository = pathname.slice(1).replace(/\/$/, ''); if (repository.split('/').length !== 2) { - logger.info('Invalid github URL found'); + logger.info({ repositoryUrl }, 'Invalid github URL found'); return null; } if (!(releases && releases.length)) { -- GitLab