aboutsummaryrefslogtreecommitdiffstats
path: root/local/theme
diff options
context:
space:
mode:
authorkongr45gpen <electrovesta@gmail.com>2017-11-13 01:26:35 +0200
committerkongr45gpen <electrovesta@gmail.com>2017-11-13 01:26:35 +0200
commit20056690507c2a69bfdb307ae5ade414dac5a795 (patch)
tree8575544ab2346cc3eabdb5c8e87dcd3d33a62106 /local/theme
parent1a87997aa49a8a3931525c910400bf8db141ddb7 (diff)
downloadsupybot_github-20056690507c2a69bfdb307ae5ade414dac5a795.tar.gz
supybot_github-20056690507c2a69bfdb307ae5ade414dac5a795.tar.bz2
supybot_github-20056690507c2a69bfdb307ae5ade414dac5a795.zip
Improve issues theme
Closes #10 Closes #11
Diffstat (limited to 'local/theme')
-rw-r--r--local/theme/DefaultTheme.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/local/theme/DefaultTheme.py b/local/theme/DefaultTheme.py
index d9ee11a..dbb8128 100644
--- a/local/theme/DefaultTheme.py
+++ b/local/theme/DefaultTheme.py
@@ -83,18 +83,30 @@ class DefaultTheme(Theme):
formattedActor = ircutils.bold(formattedActor)
extra = ''
+ formattedFiller = type
if action == 'assigned':
- extra = " to %s" % ircutils.bold(ircutils.mircColor(assignee, "green"))
+ if assignee == actor:
+ # Don't show assignee name twice
+ action = 'self-assigned'
+ else:
+ extra = " to %s" % ircutils.bold(ircutils.mircColor(assignee, "green"))
elif action == 'unassigned':
extra = " from %s" % ircutils.mircColor(assignee, "green")
- elif action == 'labeled' or action == 'unlabeled':
+ elif action == 'labeled':
+ # This is not the same syntax as 'unlabeled', since adding a label
+ # is a more frequent action than removing one, and adding more
+ # filler text would make the message harder to read
extra = " as %s" % ircutils.mircColor(labelName, hexToMirc(labelColor))
+ elif action == 'unlabeled':
+ # Grammar gets weird here
+ action = 'removed'
+ formattedFiller = "%s label from" % ircutils.mircColor(labelName, hexToMirc(labelColor))
self.msgs.append( "%s: %s %s %s #%s%s%s%s %s%s" % (
self.repo(),
formattedActor,
colorAction(action),
- type,
+ formattedFiller,
issueNo,
" \"%s\"" % (ircutils.bold(issueTitle)) if showName else '',
" by %s" % ircutils.mircColor(creator,"green") if creator != actor else '',

© 2014-2024 Faster IT GmbH | imprint | privacy policy