diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-04-24 16:10:35 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-04-24 16:10:35 +0300 |
commit | e8aae1ec717261b7a3b74201c8d6d294e05dfa65 (patch) | |
tree | 65c1d64adfe0639e7ce16af9202269a909ba47c9 /mod | |
parent | 79e7b0c3e48ee75108bf072aa174fb034dfaf86e (diff) |
Add support for build-email package manifest value
Diffstat (limited to 'mod')
-rw-r--r-- | mod/mod-build-result.cxx | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/mod/mod-build-result.cxx b/mod/mod-build-result.cxx index 917a6d0..1531183 100644 --- a/mod/mod-build-result.cxx +++ b/mod/mod-build-result.cxx @@ -262,7 +262,11 @@ handle (request& rq, response&) t.commit (); } - if (!notify) + // Don't send the notification email if the empty package build email is + // specified. + // + const optional<email>& build_email (p->build_email); + if (!notify || (build_email && build_email->empty ())) return true; assert (b != nullptr); @@ -284,12 +288,14 @@ handle (request& rq, response&) subj += " after " + to_string (*prev_status); } - // If the package email address is not specified, then it is assumed to be - // the same as the project email address. + // If the package build address is not specified, then it is assumed to be + // the same as the package email address, if specified, otherwise as the + // project email address. // - const string& to (p->package_email - ? *p->package_email - : p->email); + const string& to (build_email ? *build_email + : p->package_email + ? *p->package_email + : p->email); auto print_args = [&trace, this] (const char* args[], size_t n) { |