diff --git a/GitForWindowsHelper/component-updates.js b/GitForWindowsHelper/component-updates.js index 22586b7..a19cec9 100644 --- a/GitForWindowsHelper/component-updates.js +++ b/GitForWindowsHelper/component-updates.js @@ -102,11 +102,13 @@ const guessReleaseNotes = async (context, issue) => { } const matchURL = async () => { - if (package_name === 'perl') return `http://search.cpan.org/dist/perl-${version}/pod/perldelta.pod` - if (package_name === 'curl') return `https://curl.se/changes.html#${version.replaceAll('.', '_')}` - if (package_name === 'openssl') return `https://www.openssl.org/news/openssl-${ + switch (package_name.replace(/^mingw-w64-/, '')) { + case 'perl': return `http://search.cpan.org/dist/perl-${version}/pod/perldelta.pod` + case 'curl': return `https://curl.se/changes.html#${version.replaceAll('.', '_')}` + case 'openssl': return `https://www.openssl.org/news/openssl-${ version.replace(/^(1\.1\.1|[3-9]\.\d+).*/, '$1') }-notes.html` + } if (!issue.pull_request) return matchURLInIssue(issue) diff --git a/__tests__/component-updates.test.js b/__tests__/component-updates.test.js index 37e3125..3cef8ae 100644 --- a/__tests__/component-updates.test.js +++ b/__tests__/component-updates.test.js @@ -150,6 +150,17 @@ http://www.gnutls.org/news.html#2023-02-10` version: '8.1.1' }) + expect(await guessReleaseNotes(context, { + pull_request: { "html_url": "https://github.com/git-for-windows/MINGW-packages/pull/120" }, + title: 'mingw-w64-curl: update to 8.8.0', + body: `This closes https://github.com/git-for-windows/git/issues/4963` + })).toEqual({ + type: 'feature', + message: 'Comes with [cURL v8.8.0](https://curl.se/changes.html#8_8_0).', + package: 'mingw-w64-curl', + version: '8.8.0' + }) + expect(await guessReleaseNotes(context, { labels: [{ name: 'component-update' }], title: '[New openssl version] OpenSSL 1.1.1u',