Skip to content

Commit 823757a

Browse files
committed
guess release notes: special-case Perl
We would like to show useful links in the release notes for new Perl versions, just like we did before we switched from using `please.sh upgrade perl` to branch deployments. See also git-for-windows/MSYS2-packages#97 (comment) Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 6a7da0b commit 823757a

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

GitForWindowsHelper/component-updates.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ const guessReleaseNotes = async (context, issue) => {
6666
}
6767

6868
const matchURL = async () => {
69+
if (package_name === 'perl') return `http://search.cpan.org/dist/perl-${version}/pod/perldelta.pod`
70+
6971
if (!issue.pull_request) return matchURLInIssue(issue)
7072

7173
const match = issue.body.match(/See (https:\/\/\S+) for details/)

__tests__/component-updates.test.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,13 @@ http://www.gnutls.org/news.html#2023-02-10`
7777
type: 'feature',
7878
message: 'Comes with [GNU TLS v3.8.0](https://lists.gnupg.org/pipermail/gnutls-help/2023-February/004816.html).'
7979
})
80+
81+
expect(await guessReleaseNotes(context, {
82+
labels: [{ name: 'component-update' }],
83+
title: '[New perl version] v5.36.1',
84+
body: `\nhttps://github.com/Perl/perl5/releases/tag/v5.36.1`
85+
})).toEqual({
86+
type: 'feature',
87+
message: 'Comes with [Perl v5.36.1](http://search.cpan.org/dist/perl-5.36.1/pod/perldelta.pod).'
88+
})
8089
})

0 commit comments

Comments
 (0)