diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-04-24 22:13:01 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-04-24 23:28:32 +0300 |
commit | 0cde847a1bb31f2b6c66e3d557a8bacc0e9186c4 (patch) | |
tree | 7c616ae7219eb2a44a57191da639b3f4fd4e0ace /mod/mod-build-result.cxx | |
parent | bd7ac6b11d9282e40fe55a1e855e82f65b4385c1 (diff) |
Adjust build result notification email
Diffstat (limited to 'mod/mod-build-result.cxx')
-rw-r--r-- | mod/mod-build-result.cxx | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/mod/mod-build-result.cxx b/mod/mod-build-result.cxx index 1531183..23381de 100644 --- a/mod/mod-build-result.cxx +++ b/mod/mod-build-result.cxx @@ -275,18 +275,8 @@ handle (request& rq, response&) // try { - string subj (b->package_name + '/' + b->package_version.string () + ' ' + - b->configuration); - - if (!prev_status) - subj += " build: " + to_string (*b->status); - else - { - subj += " rebuild: " + to_string (*b->status); - - if (*prev_status != *b->status) - subj += " after " + to_string (*prev_status); - } + string subj (to_string (*b->status) + ": " + b->package_name + '/' + + b->package_version.string () + '/' + b->configuration); // 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 @@ -328,17 +318,21 @@ handle (request& rq, response&) // design). // const version& ver (b->package_version); + ostream& os (sm.out); + + assert (b->status); + os << "combined: " << *b->status << endl << endl + << " " << url << pkg << '/' << ver << "/log/" << cfg << endl << endl; for (const auto& r: b->results) - sm.out << r.operation << ": " << r.status << ", " << url << pkg << '/' - << ver << "/log/" << cfg << '/' << r.operation << endl; - - sm.out << endl - << "force rebuild: " << options_->host () << options_->root () - << "?build-force&p=" << pkg << "&v=" << ver << "&c=" << cfg - << "&reason=" << endl << endl - << "Note: enter the rebuild reason in the above URL (" - << "using '+' instead of space characters)." << endl; + os << r.operation << ": " << r.status << endl << endl + << " " << url << pkg << '/' << ver << "/log/" << cfg << '/' + << r.operation << endl << endl; + + os << "Force rebuild (enter the reason, use '+' instead of spaces):" + << endl << endl + << " " << options_->host () << options_->root () << "?build-force&p=" + << pkg << "&v=" << ver << "&c=" << cfg << "&reason=" << endl; } sm.out.close (); |