diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-11-05 00:09:51 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-11-05 00:09:51 +0100 |
commit | 16b135cae98a0d3c9d6050783a6fb1deb3fae9b5 (patch) | |
tree | fa975f3cbb13eb0d1f65b69c789916449d8b23cc /scripts | |
parent | cc71d352651a0d954227fac62c1395c56b1cff45 (diff) | |
download | curl-16b135cae98a0d3c9d6050783a6fb1deb3fae9b5.tar.gz |
scripts/release-notes.pl: use out of repo links verbatim in refs
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/release-notes.pl | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/scripts/release-notes.pl b/scripts/release-notes.pl index d52c2554c..4260c5995 100755 --- a/scripts/release-notes.pl +++ b/scripts/release-notes.pl @@ -82,6 +82,27 @@ sub getref { return $#refs + 1; } +# '#num' +# 'num' +# 'https://github.com/curl/curl/issues/6939' +# 'https://github.com/curl/curl-www/issues/69' + +sub extract { + my ($ref)=@_; + if($ref =~ /^(\#|)(\d+)/) { + # return the plain number + return $2; + } + elsif($ref =~ /^https:\/\/github.com\/curl\/curl\/.*\/(\d+)/) { + # return the plain number + return $2; + } + else { + # return the URL + return $ref; + } +} + my $short; my $first; for my $l (@gitlog) { @@ -107,14 +128,14 @@ for my $l (@gitlog) { # not the first my $line = $1; - if($line =~ /^Fixes(:|) .*[^0-9](\d+)/i) { - push @fixes, $2; + if($line =~ /^Fixes(:|) *(.*)/i) { + push @fixes, extract($2); } - elsif($line =~ /^Clo(s|)es(:|) .*[^0-9](\d+)/i) { - push @closes, $3; + elsif($line =~ /^Clo(s|)es(:|) *(.*)/i) { + push @closes, extract($3); } elsif($line =~ /^Bug: (.*)/i) { - push @bug, $1; + push @bug, extract($1); } } } |