aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-build-result.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-06-30 15:29:21 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-07-01 13:15:17 +0300
commitd97faa864483c4141613f785f371b8fdb42876c7 (patch)
tree16ec5521af26404498e9889e21b795519d9b0723 /mod/mod-build-result.cxx
parentb8f351516e4c8cabe808c13e3e47e35ccddc4571 (diff)
Add support for disabling package build notification emails per toolchain name
Diffstat (limited to 'mod/mod-build-result.cxx')
-rw-r--r--mod/mod-build-result.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/mod/mod-build-result.cxx b/mod/mod-build-result.cxx
index 1445a1d..a55b41f 100644
--- a/mod/mod-build-result.cxx
+++ b/mod/mod-build-result.cxx
@@ -525,6 +525,17 @@ handle (request& rq, response&)
if (bld == nullptr)
return true;
+ // Bail out if sending build notification emails is disabled for this
+ // toolchain.
+ //
+ {
+ const map<string, bool>& tes (options_->build_toolchain_email ());
+
+ auto i (tes.find (bld->id.toolchain_name));
+ if (i != tes.end () && !i->second)
+ return true;
+ }
+
string subj ((unforced ? "build " : "rebuild ") +
to_string (*bld->status) + ": " +
bld->package_name.string () + '/' +