diff options
author | kongr45gpen <kongr45gpen@helit.org> | 2015-01-01 01:14:03 +0200 |
---|---|---|
committer | kongr45gpen <kongr45gpen@helit.org> | 2015-01-01 01:14:03 +0200 |
commit | b7402c70de2217aa1551a27992578c31837edc7a (patch) | |
tree | 77757829ad47f8baa303f4817db8ba95cc4a3777 | |
parent | 07f5ee7b61092488202783737b1a74dd8327973d (diff) | |
download | supybot_github-b7402c70de2217aa1551a27992578c31837edc7a.tar.gz supybot_github-b7402c70de2217aa1551a27992578c31837edc7a.tar.bz2 supybot_github-b7402c70de2217aa1551a27992578c31837edc7a.zip |
When unassigning issues, show the previous assignee
-rw-r--r-- | local/handler/IssueHandler.py | 4 | ||||
-rw-r--r-- | local/theme/DefaultTheme.py | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/local/handler/IssueHandler.py b/local/handler/IssueHandler.py index 1265745..4d6fb46 100644 --- a/local/handler/IssueHandler.py +++ b/local/handler/IssueHandler.py @@ -6,7 +6,9 @@ def handle(data, theme): milestone = data['issue']['milestone']['title'] assignee = '' - if 'assignee' in data['issue'] and data['issue']['assignee']: + if 'assigne' in data and data['assignee']: + assignee = data['assignee']['login'] + elif 'assignee' in data['issue'] and data['issue']['assignee']: assignee = data['issue']['assignee']['login'] labelName = None diff --git a/local/theme/DefaultTheme.py b/local/theme/DefaultTheme.py index e7a8643..c5e827c 100644 --- a/local/theme/DefaultTheme.py +++ b/local/theme/DefaultTheme.py @@ -86,6 +86,8 @@ class DefaultTheme(Theme): extra = '' if action == 'assigned': 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': extra = " as %s" % ircutils.mircColor(labelName, hexToMirc(labelColor)) |