diff --git a/lib/platform/gitlab/index.js b/lib/platform/gitlab/index.js index 2cb7f7e94529b43a45a5eb5d5b8d887c219657f5..91ada455bd48feda0a66c39292d4ca137aa8cd1f 100644 --- a/lib/platform/gitlab/index.js +++ b/lib/platform/gitlab/index.js @@ -718,8 +718,8 @@ async function getPrFiles(mrNo) { } const files = (await get( `projects/${config.repository}/merge_requests/${mrNo}/changes` - )).body; - return files.map(f => f.filename); + )).body.changes; + return files.map(f => f.new_path); } // istanbul ignore next diff --git a/test/platform/gitlab/index.spec.js b/test/platform/gitlab/index.spec.js index 25c55c2b9edd69ddd9b3e3510ae4224a018fac51..4fc36587275774b01044a27978a59343ecde4ff3 100644 --- a/test/platform/gitlab/index.spec.js +++ b/test/platform/gitlab/index.spec.js @@ -870,10 +870,12 @@ describe('platform/gitlab', () => { }); it('returns files', async () => { get.mockReturnValueOnce({ - body: [ - { filename: 'renovate.json' }, - { filename: 'not renovate.json' }, - ], + body: { + changes: [ + { new_path: 'renovate.json' }, + { new_path: 'not renovate.json' }, + ], + }, }); const prFiles = await gitlab.getPrFiles(123); expect(prFiles).toMatchSnapshot();