Commit 11ec0b5b authored by Xavier Guimard's avatar Xavier Guimard

salsa: fix email recipients afterglow when used with --all

Closes: #921640
parent b724c19a
......@@ -22,6 +22,8 @@ devscripts (2.19.3) UNRELEASED; urgency=medium
+ Slightly improve the documentation. Closes: #919402; MR: !100
+ Fix misinterpretation of SALSA_IRKER in devscripts.conf.
+ Fix the impossibility to delete email-on-push.
+ Fix email recipients afterglow when used with --all.
Closes: #921640; MR: !104
* uscan: MR: !101
+ Fix dehs output with components with the "ignore" version.
+ Fix dehs output when "group" is used.
......
......@@ -107,7 +107,7 @@ sub add_hooks {
'emails-on-push',
{
recipients => join(' ',
map { s/%p/$repo/; $_ }
map { my $a = $_; $a =~ s/%p/$repo/; $a }
@{ $self->config->email_recipient }),
});
no warnings;
......
......@@ -79,9 +79,18 @@ sub _check_repo {
if ($self->config->email
and not($hooks->{email} and %{ $hooks->{email} })) {
push @err, "email-on-push missing";
} elsif ($self->config->email
and $hooks->{email}->{recipients} ne
join(' ', @{ $self->config->email_recipient })) {
} elsif (
$self->config->email
and $hooks->{email}->{recipients} ne join(
' ',
map {
my $a = $_;
my $b = $name;
$b =~ s#.*/##;
$a =~ s/%p/$b/;
$a
} @{ $self->config->email_recipient })
) {
push @err, "bad email recipients " . $hooks->{email}->{recipients};
} elsif ($self->config->disable_email and $hooks->{kgb}) {
push @err, "email-on-push enabled";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment