Skip to content

Commit

Permalink
Merge pull request #35 from dscho/guess-better-openssl-release-notes
Browse files Browse the repository at this point in the history
guess release notes: special-case OpenSSL
  • Loading branch information
dscho authored May 30, 2023
2 parents c10768d + 4d9eeb6 commit ffe1dbd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions GitForWindowsHelper/component-updates.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ 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-${
version.replace(/^(1\.1\.1|[3-9]\.\d+).*/, '$1')
}-notes.html`

if (!issue.pull_request) return matchURLInIssue(issue)

Expand Down
18 changes: 18 additions & 0 deletions __tests__/component-updates.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,22 @@ http://www.gnutls.org/news.html#2023-02-10`
type: 'feature',
message: 'Comes with [cURL v8.1.1](https://curl.se/changes.html#8_1_1).'
})

expect(await guessReleaseNotes(context, {
labels: [{ name: 'component-update' }],
title: '[New openssl version] OpenSSL 1.1.1u',
body: `\nhttps://github.com/openssl/openssl/releases/tag/OpenSSL_1_1_1u`
})).toEqual({
type: 'feature',
message: 'Comes with [OpenSSL v1.1.1u](https://www.openssl.org/news/openssl-1.1.1-notes.html).'
})

expect(await guessReleaseNotes(context, {
labels: [{ name: 'component-update' }],
title: '[New openssl version] OpenSSL 3.1.1',
body: `\nhttps://github.com/openssl/openssl/releases/tag/openssl-3.1.1`
})).toEqual({
type: 'feature',
message: 'Comes with [OpenSSL v3.1.1](https://www.openssl.org/news/openssl-3.1-notes.html).'
})
})

0 comments on commit ffe1dbd

Please sign in to comment.