Check all inputs for blame but only email selected inputs
Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
@ -148,7 +148,7 @@ sub fetchInputSystemBuild {
|
||||
}
|
||||
|
||||
sub fetchInput {
|
||||
my ($plugins, $db, $project, $jobset, $name, $type, $value, $checkresponsbile) = @_;
|
||||
my ($plugins, $db, $project, $jobset, $name, $type, $value, $emailresponsible) = @_;
|
||||
my @inputs;
|
||||
|
||||
if ($type eq "build") {
|
||||
@ -179,7 +179,7 @@ sub fetchInput {
|
||||
|
||||
foreach my $input (@inputs) {
|
||||
$input->{type} = $type;
|
||||
$input->{checkresponsible} = $checkresponsible;
|
||||
$input->{emailresponsible} = $emailresponsible;
|
||||
}
|
||||
|
||||
return @inputs;
|
||||
@ -545,7 +545,7 @@ sub checkBuild {
|
||||
, uri => $input->{uri}
|
||||
, revision => $input->{revision}
|
||||
, value => $input->{value}
|
||||
, checkresponsible => $input->{checkresponsible}
|
||||
, emailresponsible => $input->{emailresponsible}
|
||||
, dependency => $input->{id}
|
||||
, path => $input->{storePath} || "" # !!! temporary hack
|
||||
, sha256hash => $input->{sha256hash}
|
||||
|
@ -259,10 +259,11 @@ sub getResponsibleAuthors {
|
||||
|
||||
my $nrCommits = 0;
|
||||
my %authors;
|
||||
my @emailable_authors;
|
||||
|
||||
if ($prevBuild) {
|
||||
foreach my $curInput ($build->buildinputs_builds) {
|
||||
next unless (($curInput->type eq "git" || $curInput->type eq "hg") && $curInput->checkresponsible);
|
||||
next unless ($curInput->type eq "git" || $curInput->type eq "hg");
|
||||
my $prevInput = $prevBuild->buildinputs_builds->find({ name => $curInput->name });
|
||||
next unless defined $prevInput;
|
||||
|
||||
@ -278,12 +279,13 @@ sub getResponsibleAuthors {
|
||||
foreach my $commit (@commits) {
|
||||
#print STDERR "$commit->{revision} by $commit->{author}\n";
|
||||
$authors{$commit->{author}} = $commit->{email};
|
||||
push @emailable_authors, $commit->{email} if $curInput->emailresponsible;
|
||||
$nrCommits++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (\%authors, $nrCommits);
|
||||
return (\%authors, $nrCommits, \@emailable_authors);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user