forked from lix-project/hydra
Only email responsible authors when the build has changed
This commit is contained in:
parent
8dcef7702f
commit
b29d7b1091
|
@ -80,7 +80,9 @@ sub buildFinished {
|
||||||
|
|
||||||
my ($authors, $nrCommits, $emailable_authors) = getResponsibleAuthors($build, $self->{plugins});
|
my ($authors, $nrCommits, $emailable_authors) = getResponsibleAuthors($build, $self->{plugins});
|
||||||
my $authorList;
|
my $authorList;
|
||||||
if (scalar keys %{$authors} > 0) {
|
my $prevBuild = getPreviousBuild($build);
|
||||||
|
if (scalar keys %{$authors} > 0 &&
|
||||||
|
((!defined $prevBuild) || ($build->buildstatus != $prevBuild->buildstatus))) {
|
||||||
my @x = map { "$_ <$authors->{$_}>" } (sort keys %{$authors});
|
my @x = map { "$_ <$authors->{$_}>" } (sort keys %{$authors});
|
||||||
$authorList = join(" or ", scalar @x > 1 ? join(", ", @x[0..scalar @x - 2]): (), $x[-1]);
|
$authorList = join(" or ", scalar @x > 1 ? join(", ", @x[0..scalar @x - 2]): (), $x[-1]);
|
||||||
$addresses{$_} = { builds => [ $build ] } foreach (@{$emailable_authors});
|
$addresses{$_} = { builds => [ $build ] } foreach (@{$emailable_authors});
|
||||||
|
|
Loading…
Reference in a new issue