Skip to content

Commit

Permalink
guess release notes: special-case OpenSSL
Browse files Browse the repository at this point in the history
We would like to show useful links in the release notes for new OpenSSL
versions, just like we did before we switched from using `please.sh
upgrade openssl` to branch deployments:

https://github.com/git-for-windows/build-extra/blob/d488d45e052b/please.sh#L1930-L1932

Signed-off-by: Johannes Schindelin <[email protected]>
  • Loading branch information
dscho committed May 30, 2023
1 parent c10768d commit 4d9eeb6
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 4d9eeb6

Please sign in to comment.