Check all inputs for blame but only email selected inputs

Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
Shea Levy
2013-10-08 14:47:24 -04:00
parent 804617f075
commit 26470f1656
11 changed files with 28 additions and 47 deletions

View File

@ -79,14 +79,12 @@ sub buildFinished {
}
}
my ($authors, $nrCommits) = getResponsibleAuthors($build, $self->{plugins});
my ($authors, $nrCommits, $emailable_authors) = getResponsibleAuthors($build, $self->{plugins});
my $authorList;
if (scalar keys %{authors} > 0) {
my @x = map { "$_ <$authors->{$_}>" } (sort keys %{$authors});
$authorList = join(" or ", scalar @x > 1 ? join(", ", @[0..scalar @x - 2]): (), $x[-1]);
if ($build->jobset->emailresponsible) {
$addresses{$authors->{$_}} = { builds => [ $build ] } foreach (keys %{$authors});
}
$addresses{$_} = { builds => [ $build ] } foreach (@{$emailable_authors});
}
# Send an email to each interested address.