diff --git a/lib/platform/gitlab/index.js b/lib/platform/gitlab/index.js index 2fdea58ac766411428e88027ace52dfdff043ba3..5c48502c4b996b73a64901f134f437f1e434dde5 100644 --- a/lib/platform/gitlab/index.js +++ b/lib/platform/gitlab/index.js @@ -438,17 +438,18 @@ async function findIssue(title) { async function ensureIssue(title, body) { logger.debug(`ensureIssue()`); + const description = getPrBody(body); try { const issueList = await getIssueList(); const issue = issueList.find(i => i.title === title); if (issue) { - const issueBody = (await get( + const existingDescription = (await get( `projects/${config.repository}/issues/${issue.iid}` )).body.description; - if (issueBody !== body) { + if (existingDescription !== description) { logger.debug('Updating issue body'); await get.put(`projects/${config.repository}/issues/${issue.iid}`, { - body: { description: body }, + body: { description }, }); return 'updated'; } @@ -456,7 +457,7 @@ async function ensureIssue(title, body) { await get.post(`projects/${config.repository}/issues`, { body: { title, - description: body, + description, }, }); // delete issueList so that it will be refetched as necessary