From a84bc2c3ed2e138b979a8403a977fce95891a670 Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@keylocation.sg> Date: Tue, 17 Oct 2017 14:37:57 +0200 Subject: [PATCH] feat: workaround gitlab hyperlinking bug (#967) Add space before closing `</h4>` to prevent unintential hyperlinking on GitLab. Closes #954 --- lib/api/gitlab.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/api/gitlab.js b/lib/api/gitlab.js index 62607e6983..8da2e4481e 100644 --- a/lib/api/gitlab.js +++ b/lib/api/gitlab.js @@ -372,6 +372,7 @@ async function createPr(branchName, title, body, useDefaultBranch) { : config.baseBranch; logger.debug(`Creating Merge Request: ${title}`); const description = body + .replace('</h4>', ' </h4>') // See #954 .replace(/Pull Request/g, 'Merge Request') .replace(/PR/g, 'MR'); const res = await get.post(`projects/${config.repoName}/merge_requests`, { @@ -416,6 +417,7 @@ async function getPr(prNo) { async function updatePr(prNo, title, body) { const description = body + .replace('</h4>', ' </h4>') // See #954 .replace(/Pull Request/g, 'Merge Request') .replace(/PR/g, 'MR'); await get.put(`projects/${config.repoName}/merge_requests/${prNo}`, { -- GitLab