secret
Created

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#!/usr/bin/perl
 
my ($branch, $before_sha, $after_sha) = @ARGV;
warn "updating ref $branch";
 
if ($branch ne 'refs/heads/master') {
exit 0;
}
 
my $testing_merges=`git log --pretty=%s $before_sha..$after_sha | grep "testing" | wc -l`;
chop $testing_merges;
 
if (0 + $testing_merges > 0) {
warn "error: possible merge of testing branch into master, do not use 'testing' in commit message";
warn " $testing_merges";
exit 1;
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.