]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix scripts/update-contributors.pl CONTRIBUTORS screening (#2125) auto master
authorAlex Rousskov <rousskov@measurement-factory.com>
Mon, 21 Jul 2025 21:18:14 +0000 (21:18 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Mon, 21 Jul 2025 21:18:24 +0000 (21:18 +0000)
    Possible unintended interpolation of @users in string
    Bareword "true" not allowed
    Bareword "false" not allowed
    Execution of ... aborted due to compilation errors

Recent commit daa76f41 broke scripts/update-contributors.pl syntax (see
error messages quoted above) and its lower-case comparison logic,
effectively disabling CONTRIBUTORS checks.

Also do not hide update-contributors.pl execution failures. Buggy
failure detection contributed to the above problems ignored by CI tests.

scripts/source-maintenance.sh
scripts/update-contributors.pl

index ea2d890f56c4f61a7a8aff1a0d9d820bc7421610..edaa782fd3bcbf368dfd76c84244992cf0c4e840 100755 (executable)
@@ -763,15 +763,12 @@ collectAuthors ()
     # but do not add committers (--format='    %cn <%ce>').
 
     # add collected new (co-)authors, if any, to CONTRIBUTORS
-    if ./scripts/update-contributors.pl --quiet < authors.tmp > CONTRIBUTORS.new
-    then
-        updateIfChanged CONTRIBUTORS CONTRIBUTORS.new  \
-            "A human PR description should match: $vettedCommitPhraseRegex"
-    fi
-    result=$?
+    ./scripts/update-contributors.pl --quiet < authors.tmp > CONTRIBUTORS.new || return
+    updateIfChanged CONTRIBUTORS CONTRIBUTORS.new  \
+        "A human PR description should match: $vettedCommitPhraseRegex" || return
 
     rm -f authors.tmp
-    return $result
+    return 0
 }
 
 # Update CONTRIBUTORS content
index 804c45f3b832b921533a1eb501a63026b04be91c..1ccb72ff05208aaa9f75f26d1961a39760a5b3f2 100755 (executable)
@@ -134,9 +134,10 @@ sub worseThan
 sub isManuallyExcluded
 {
     my ($c) = @_;
-    return true if lc(contributorToString($c)) =~ /squidadm/; # a known bot
-    return true if lc(contributorToString($c)) =~ /Copilot@users.noreply.github.com/; # a known bot
-    return false;
+    my $lowerCasedContributorGist = lc(contributorToString($c));
+    return 1 if $lowerCasedContributorGist =~ /squidadm/; # a known bot
+    return 1 if $lowerCasedContributorGist =~ /copilot[@]users[.]noreply[.]github[.]com/; # a known bot
+    return 0;
 }
 
 sub contributorToString