[gnome-continuous] ircbot: Make the build result a bit more subtle
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous] ircbot: Make the build result a bit more subtle
- Date: Thu, 13 Apr 2017 10:58:32 +0000 (UTC)
commit 798c2b97c92c7b273fa498ea07587fb73bacbbb3
Author: Emmanuele Bassi <ebassi gnome org>
Date: Thu Apr 13 11:57:29 2017 +0100
ircbot: Make the build result a bit more subtle
We're generally interested in the result, so make it "pop" a bit more,
with bold and color.
extras/ircbot/bot.py | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/extras/ircbot/bot.py b/extras/ircbot/bot.py
index 3a508a6..08955ba 100644
--- a/extras/ircbot/bot.py
+++ b/extras/ircbot/bot.py
@@ -42,7 +42,7 @@ from twisted.application import internet, service
from twisted.python import log
def mirc_color(code, S):
- return "\x03%d%s\x03" % (code, S)
+ return "\x02\x03%d%s\x03\x02" % (code, S)
GREEN = 3
RED = 4
@@ -140,18 +140,13 @@ class BuildGnomeOrg(irc.IRCClient):
build_name = self._relpath_to_version(metadata['buildPath'])
millis = float(metadata['elapsedMillis'])
success = metadata['success']
- success_str = success and 'successful' or 'failed'
+ success_str = success and mirc_color(GREEN, 'SUCCESS') or mirc_color(RED, 'FAILED')
- msg = u"continuous:%s %s: %s in %.1f seconds. %s " \
+ msg = u"continuous:%s[%s]: %s: (%.1f seconds): %s " \
% (taskname, build_name, success_str, millis / 1000.0, status_msg)
msg += "%s/%s/" % (self._workurl, metadata['path'])
- if not success:
- msg = mirc_color(RED, msg)
- else:
- msg = mirc_color(GREEN, msg)
-
return msg
def _get_channels_for_changed_components(self, taskname):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]