diff --git a/scripts/source-maintenance.sh b/scripts/source-maintenance.sh index f5ad8f8d3cc..e708bb49f8d 100755 --- a/scripts/source-maintenance.sh +++ b/scripts/source-maintenance.sh @@ -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 diff --git a/scripts/update-contributors.pl b/scripts/update-contributors.pl index 8ffcec6e878..bcf4ce0a795 100755 --- a/scripts/update-contributors.pl +++ b/scripts/update-contributors.pl @@ -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