mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 15:06:27 +00:00
feat: find release notes for lerna monorepos (#7457)
This commit is contained in:
parent
1c3caa67c9
commit
78c2d6a42f
3 changed files with 29 additions and 2 deletions
|
@ -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 1`] = `null`;
|
||||||
|
|
||||||
exports[`workers/pr/changelog/release-notes getReleaseNotes() gets release notes with body from gitlab repo 2`] = `
|
exports[`workers/pr/changelog/release-notes getReleaseNotes() gets release notes with body from gitlab repo 2`] = `
|
||||||
|
|
|
@ -146,7 +146,7 @@ describe(getName(__filename), () => {
|
||||||
expect(res).toBeNull();
|
expect(res).toBeNull();
|
||||||
expect(httpMock.getTrace()).toMatchSnapshot();
|
expect(httpMock.getTrace()).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
it.each([[''], ['v'], ['other-'], ['other_v']])(
|
it.each([[''], ['v'], ['other-'], ['other_v'], ['other@']])(
|
||||||
'gets release notes with body',
|
'gets release notes with body',
|
||||||
async (prefix) => {
|
async (prefix) => {
|
||||||
httpMock
|
httpMock
|
||||||
|
|
|
@ -97,7 +97,8 @@ export async function getReleaseNotes(
|
||||||
release.tag === version ||
|
release.tag === version ||
|
||||||
release.tag === `v${version}` ||
|
release.tag === `v${version}` ||
|
||||||
release.tag === `${depName}-${version}` ||
|
release.tag === `${depName}-${version}` ||
|
||||||
release.tag === `${depName}_v${version}`
|
release.tag === `${depName}_v${version}` ||
|
||||||
|
release.tag === `${depName}@${version}`
|
||||||
) {
|
) {
|
||||||
releaseNotes = release;
|
releaseNotes = release;
|
||||||
releaseNotes.url = baseUrl.includes('gitlab')
|
releaseNotes.url = baseUrl.includes('gitlab')
|
||||||
|
|
Loading…
Reference in a new issue