diff --git a/lib/workers/pr/changelog/__snapshots__/release-notes.spec.ts.snap b/lib/workers/pr/changelog/__snapshots__/release-notes.spec.ts.snap index 5cb9c774267e3bc07902143e30b246383b5819a8..fe71e95fbc5b4a0c5490b573a59c3387144795c1 100644 --- a/lib/workers/pr/changelog/__snapshots__/release-notes.spec.ts.snap +++ b/lib/workers/pr/changelog/__snapshots__/release-notes.spec.ts.snap @@ -208,6 +208,32 @@ Array [ ] `; +exports[`workers/pr/changelog/release-notes getReleaseNotes() gets release notes with body 9`] = ` +Object { + "body": "some body [#123](https://github.com/some/other-repository/issues/123), [#124](https://github.com/some/yet-other-repository/issues/124) +", + "id": undefined, + "name": undefined, + "tag": "other@1.0.1", + "url": "https://github.com/some/other-repository/releases/other@1.0.1", +} +`; + +exports[`workers/pr/changelog/release-notes getReleaseNotes() gets release notes with body 10`] = ` +Array [ + Object { + "headers": Object { + "accept": "application/vnd.github.v3+json", + "accept-encoding": "gzip, deflate", + "host": "api.github.com", + "user-agent": "https://github.com/renovatebot/renovate", + }, + "method": "GET", + "url": "https://api.github.com/repos/some/other-repository/releases?per_page=100", + }, +] +`; + exports[`workers/pr/changelog/release-notes getReleaseNotes() gets release notes with body from gitlab repo 1`] = `null`; exports[`workers/pr/changelog/release-notes getReleaseNotes() gets release notes with body from gitlab repo 2`] = ` diff --git a/lib/workers/pr/changelog/release-notes.spec.ts b/lib/workers/pr/changelog/release-notes.spec.ts index 0db5dbd18d84f435dfb6206f500f24da36097ffe..124b0e14fc2b247571c32f9009f1847a09a19c99 100644 --- a/lib/workers/pr/changelog/release-notes.spec.ts +++ b/lib/workers/pr/changelog/release-notes.spec.ts @@ -146,7 +146,7 @@ describe(getName(__filename), () => { expect(res).toBeNull(); expect(httpMock.getTrace()).toMatchSnapshot(); }); - it.each([[''], ['v'], ['other-'], ['other_v']])( + it.each([[''], ['v'], ['other-'], ['other_v'], ['other@']])( 'gets release notes with body', async (prefix) => { httpMock diff --git a/lib/workers/pr/changelog/release-notes.ts b/lib/workers/pr/changelog/release-notes.ts index aac17409ca32a63c8f6941cc7156b240997f0f7d..bfb062a4ad40d45aebfcd5a9eb3798d3d52b56c0 100644 --- a/lib/workers/pr/changelog/release-notes.ts +++ b/lib/workers/pr/changelog/release-notes.ts @@ -97,7 +97,8 @@ export async function getReleaseNotes( release.tag === version || release.tag === `v${version}` || release.tag === `${depName}-${version}` || - release.tag === `${depName}_v${version}` + release.tag === `${depName}_v${version}` || + release.tag === `${depName}@${version}` ) { releaseNotes = release; releaseNotes.url = baseUrl.includes('gitlab')