Meta/cook: fix the reference links
Also support "Inviting" as a will-do phrase.
Junio C Hamano committed
Jul 29, 2024 at 19:08 UTC
648e17ba94223e02753bdeff0b6a3839002c0edc
2 files changed
+21
-12
Reintegrate
+1
@@ -39,6 +39,7 @@ annotate_merge () {
39
if (/^Will (?:\S+ ){0,2}(fast-track|hold|keep|merge|drop|discard|cook|kick|defer|eject|be re-?rolled|wait)[,. ]/ ||
40
/^Not urgent/ || /^Not ready/ || /^Waiting for / || /^Under discussion/ ||
41
/^Can wait in / || /^Still / || /^Stuck / || /^On hold/ || /^Breaks / ||
42
+ /^Inviting / ||
43
/^Needs? / || /^Expecting / || /^May want to / || /^Under review/) {
44
return 1;
45
}
cook
+20
-12
@@ -690,12 +690,7 @@ sub topic_in_seen {
690
}
691
692
my $mergetomaster;
693
-
694
-sub tweak_willdo {
695
- my ($td) = @_;
696
- my $desc = $td->{'desc'};
697
- my $text = $td->{'text'};
698
-
693
+sub prepare_mergetomaster {
694
if (!defined $mergetomaster) {
695
my $master = `git describe $MASTER`;
696
if ($master =~ /-rc(\d+)(-\d+-g[0-9a-f]+)?$/ && $1 != 0) {
@@ -704,6 +699,12 @@ sub tweak_willdo {
699
$mergetomaster = "Will merge to '$MASTER'.";
700
}
701
}
702
+}
703
+
704
+sub tweak_willdo {
705
+ my ($td) = @_;
706
+ my $desc = $td->{'desc'};
707
+ my $text = $td->{'text'};
708
709
# If updated description (i.e. the list of patches with
710
# merge trail to 'next') has 'merged to next', then
@@ -852,6 +853,7 @@ sub wildo_match {
853
if (/^Will (?:\S+ ){0,2}(fast-track|hold|keep|merge|drop|discard|cook|kick|defer|eject|be re-?rolled|wait)[,. ]/ ||
854
/^Not urgent/ || /^Not ready/ || /^Waiting for / || /^Under discussion/ ||
855
/^Can wait in / || /^Still / || /^Stuck / || /^On hold/ || /^Breaks / ||
856
+ /^Inviting / ||
857
/^Needs? / || /^Expecting / || /^May want to / || /^Under review/) {
858
return 1;
859
}
@@ -862,6 +864,7 @@ sub wildo {
864
my $fd = shift;
865
my (%what, $topic, $last_merge_to_next, $in_section, $in_desc);
866
my $too_recent = '9999-99-99';
867
+
868
while (<$fd>) {
869
chomp;
870
@@ -944,13 +947,16 @@ sub wildo {
947
}
948
$count = "#$count";
949
printf " %s %-60s %s%s %5s\n", $sign, $name, $tip, $next, $count;
947
- if ($what !~ /^Will merge to '\w+'\.$/) {
948
- for my $s (@$source) {
949
- if ($s =~ /^<(.*)>$/) {
950
- $s = "https://lore.kernel.org/git/$1/";
951
- }
952
- printf " $s\n";
950
+ if ($what =~ /^Will merge to '\w+'/ && $what !~ /\?$/ ||
951
+ $what eq $mergetomaster) {
952
+ next;
953
+ }
954
+
955
+ for my $s (@$source) {
956
+ if (0 && $s =~ /^<(.*)>$/) {
957
+ $s = "https://lore.kernel.org/git/$1/";
958
}
959
+ printf " $s\n";
960
}
961
}
962
$ipbl = "\n";
@@ -1092,6 +1098,8 @@ if (!GetOptions("wildo" => \$wildo,
1098
exit 1;
1099
}
1100
1101
+prepare_mergetomaster;
1102
+
1103
if ($wildo) {
1104
my $fd;
1105
if (!@ARGV) {