diff options
author | kongr45gpen <electrovesta@gmail.com> | 2017-01-04 00:27:19 +0200 |
---|---|---|
committer | kongr45gpen <electrovesta@gmail.com> | 2017-01-04 00:27:19 +0200 |
commit | 7f46f55d67c50f50dc51a00d2487250c4c1e5e94 (patch) | |
tree | 3247bdc33b5125b79433a1089dee2577b51c51ee /local/utility.py | |
parent | fb353478e24e5e4341b86fec3a390906e5e8ce74 (diff) | |
download | supybot_github-7f46f55d67c50f50dc51a00d2487250c4c1e5e94.tar.gz supybot_github-7f46f55d67c50f50dc51a00d2487250c4c1e5e94.tar.bz2 supybot_github-7f46f55d67c50f50dc51a00d2487250c4c1e5e94.zip |
Note when a push is forced
Diffstat (limited to 'local/utility.py')
-rw-r--r-- | local/utility.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/local/utility.py b/local/utility.py index 59dfd91..321637e 100644 --- a/local/utility.py +++ b/local/utility.py @@ -76,7 +76,7 @@ def maxLen(msg, maxn=400, splitLines=True): if splitLines is True: lines = msg.splitlines() - line = lines[0] + line = lines[0] if lines else "" else: line = msg @@ -90,6 +90,7 @@ def maxLen(msg, maxn=400, splitLines=True): def colorAction(action): """Give an action string (e.g. created, edited) and get a nice IRC colouring""" + if action in [ "created", "opened", "tagged", "success", "passed", "fixed", "published", "completed" ]: return ircutils.bold(ircutils.mircColor(action, "green")) @@ -101,8 +102,8 @@ def colorAction(action): return ircutils.bold(ircutils.mircColor(action, "light blue")) if action in [ "reopened", "pending" ]: return ircutils.bold(ircutils.mircColor(action, "blue")) - if action in [ "forced the creation of", "forced the deletion of" ]: - return ircutils.bold(ircutils.mircColor(action,"brown")) + if action[0:5] in [ "force" ]: + return ircutils.bold(ircutils.mircColor(action, "brown")) return action def getShortURL(longurl): |