release-notes.pl: check fixes/closes lines better
To better skip lines that just happen to mention those words at the start of a line without being instructions.
This commit is contained in:
parent
f27262b179
commit
9ca194b5e2
@ -6,7 +6,7 @@
|
|||||||
# | (__| |_| | _ <| |___
|
# | (__| |_| | _ <| |___
|
||||||
# \___|\___/|_| \_\_____|
|
# \___|\___/|_| \_\_____|
|
||||||
#
|
#
|
||||||
# Copyright (C) 2020 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
|
# Copyright (C) 2020 - 2023, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
#
|
#
|
||||||
# This software is licensed as described in the file COPYING, which
|
# This software is licensed as described in the file COPYING, which
|
||||||
# you should have received as part of this distribution. The terms
|
# you should have received as part of this distribution. The terms
|
||||||
@ -88,6 +88,7 @@ sub getref {
|
|||||||
# 'num'
|
# 'num'
|
||||||
# 'https://github.com/curl/curl/issues/6939'
|
# 'https://github.com/curl/curl/issues/6939'
|
||||||
# 'https://github.com/curl/curl-www/issues/69'
|
# 'https://github.com/curl/curl-www/issues/69'
|
||||||
|
# 'https://elsewhere.example.com/discussion'
|
||||||
|
|
||||||
sub extract {
|
sub extract {
|
||||||
my ($ref)=@_;
|
my ($ref)=@_;
|
||||||
@ -99,10 +100,11 @@ sub extract {
|
|||||||
# return the plain number
|
# return the plain number
|
||||||
return $1;
|
return $1;
|
||||||
}
|
}
|
||||||
else {
|
elsif($ref =~ /:\/\//) {
|
||||||
# return the URL
|
# contains a '://', return the URL
|
||||||
return $ref;
|
return $ref;
|
||||||
}
|
}
|
||||||
|
# false alarm, not a valid line
|
||||||
}
|
}
|
||||||
|
|
||||||
my $short;
|
my $short;
|
||||||
@ -132,13 +134,16 @@ for my $l (@gitlog) {
|
|||||||
my $line = $1;
|
my $line = $1;
|
||||||
|
|
||||||
if($line =~ /^Fixes(:|) *(.*)/i) {
|
if($line =~ /^Fixes(:|) *(.*)/i) {
|
||||||
push @fixes, extract($2);
|
my $ref = extract($2);
|
||||||
|
push @fixes, $ref if($ref);
|
||||||
}
|
}
|
||||||
elsif($line =~ /^Clo(s|)es(:|) *(.*)/i) {
|
elsif($line =~ /^Clo(s|)es(:|) *(.*)/i) {
|
||||||
push @closes, extract($3);
|
my $ref = extract($3);
|
||||||
|
push @closes, $ref if($ref);
|
||||||
}
|
}
|
||||||
elsif($line =~ /^Bug: (.*)/i) {
|
elsif($line =~ /^Bug: (.*)/i) {
|
||||||
push @bug, extract($1);
|
my $ref = extract($1);
|
||||||
|
push @bug, $ref if($ref);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user