diff --git a/lib/platform/gitlab/index.js b/lib/platform/gitlab/index.js index 9eda529f27f111f20361d501fb4e27d8d580f179..2fdea58ac766411428e88027ace52dfdff043ba3 100644 --- a/lib/platform/gitlab/index.js +++ b/lib/platform/gitlab/index.js @@ -425,7 +425,7 @@ async function findIssue(title) { } const issueBody = (await get( `projects/${config.repository}/issues/${issue.iid}` - )).body.body; + )).body.description; return { number: issue.iid, body: issueBody, @@ -444,7 +444,7 @@ async function ensureIssue(title, body) { if (issue) { const issueBody = (await get( `projects/${config.repository}/issues/${issue.iid}` - )).body.body; + )).body.description; if (issueBody !== body) { logger.debug('Updating issue body'); await get.put(`projects/${config.repository}/issues/${issue.iid}`, { diff --git a/test/platform/gitlab/index.spec.js b/test/platform/gitlab/index.spec.js index fd3960d2f5e1a3b7b2820e95ee5b1bc8dd3fd235..0e7f7ba803bd889b5e5adcbbf0f3fa307947376d 100644 --- a/test/platform/gitlab/index.spec.js +++ b/test/platform/gitlab/index.spec.js @@ -591,7 +591,7 @@ describe('platform/gitlab', () => { }, ], }); - get.mockReturnValueOnce({ body: { body: 'new-content' } }); + get.mockReturnValueOnce({ body: { description: 'new-content' } }); const res = await gitlab.findIssue('title-2'); expect(res).not.toBeNull(); }); @@ -626,7 +626,7 @@ describe('platform/gitlab', () => { }, ], }); - get.mockReturnValueOnce({ body: { body: 'new-content' } }); + get.mockReturnValueOnce({ body: { description: 'new-content' } }); const res = await gitlab.ensureIssue('title-2', 'newer-content'); expect(res).toEqual('updated'); }); @@ -643,7 +643,7 @@ describe('platform/gitlab', () => { }, ], }); - get.mockReturnValueOnce({ body: { body: 'newer-content' } }); + get.mockReturnValueOnce({ body: { description: 'newer-content' } }); const res = await gitlab.ensureIssue('title-2', 'newer-content'); expect(res).toBe(null); });