Skip to content

Commit

Permalink
Merge pull request #91 from dscho/guess-better-curl-release-notes-eve…
Browse files Browse the repository at this point in the history
…n-in-MINGW-packages-PRs

guess release notes: special-case cURL (even in MINGW-packages)
  • Loading branch information
dscho authored Jul 20, 2024
2 parents e0a5e97 + c0d5c58 commit 7908c0e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
8 changes: 5 additions & 3 deletions GitForWindowsHelper/component-updates.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
11 changes: 11 additions & 0 deletions __tests__/component-updates.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 7908c0e

Please sign in to comment.