Commit 97dc46b8 authored by Robert Ricci's avatar Robert Ricci

Add an $ALWAYSMAIL_ADDRESS option to gitmaild

This gives us a way to always CC a particular address (note that
this is different from archivemail, which makes a separate message)
parent f5e6ee4f
......@@ -63,6 +63,10 @@ my $BASEPATH = "/home/git/repositories";
# noarchive=1 was passed in the URL
my $NOARCHIVE_DEFAULT = 0;
# If set, aways mail the following address (see gitmail for difference between
# alwaysmail and archivemail)
my $ALWAYSMAIL_ADDRESS = "";
#
# End settable options
#
......@@ -235,6 +239,14 @@ sub run_gitmail($$) {
$options{'alwaysmail'} =
get_member_addresses($data->{"project_id"});
}
if (defined($ALWAYSMAIL_ADDRESS) && $ALWAYSMAIL_ADDRESS ne "") {
if (exists($options{'alwaysmail'})) {
push @{$options{'alwaysmail'}}, $ALWAYSMAIL_ADDRESS;
} else {
$options{'alwaysmail'} = $ALWAYSMAIL_ADDRESS;
}
}
# gitlab's URL for this project
$options{'weburl'} = $repoinfo->{web_url};
......
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