diff options
author | kongr45gpen <electrovesta@gmail.com> | 2016-12-07 19:35:39 +0200 |
---|---|---|
committer | kongr45gpen <electrovesta@gmail.com> | 2016-12-07 19:35:39 +0200 |
commit | 8b9f59ba944eb5291e8700c1af24310d22857e23 (patch) | |
tree | f7b990886a8626c9e2db5f66a6a12a634e319baa /local | |
parent | f161a009ceeb3970f5bed2bc569bb0696e2001c8 (diff) | |
download | supybot_github-8b9f59ba944eb5291e8700c1af24310d22857e23.tar.gz supybot_github-8b9f59ba944eb5291e8700c1af24310d22857e23.tar.bz2 supybot_github-8b9f59ba944eb5291e8700c1af24310d22857e23.zip |
Add support for AppVeyor notifications
Implements #12
Diffstat (limited to 'local')
-rw-r--r-- | local/handler/AppVeyorHandler.py | 13 | ||||
-rw-r--r-- | local/handler/GithubHandler.py | 3 |
2 files changed, 16 insertions, 0 deletions
diff --git a/local/handler/AppVeyorHandler.py b/local/handler/AppVeyorHandler.py new file mode 100644 index 0000000..f60fece --- /dev/null +++ b/local/handler/AppVeyorHandler.py @@ -0,0 +1,13 @@ +from ..utility import * + +def handle(data, theme): + if isStatusVisible(data['eventData']['projectId'], data['eventData']['status'].lower()): + theme.travis( + branch = data['eventData']['branch'], + repo = data['eventData']['repositoryName'].split('/')[1], + status = data['eventData']['status'], + commitId = data['eventData']['commitId'], + commitMessage = data['eventData']['commitMessage'], + commitAuthor = data['eventData']['commitAuthor'], + buildUrl = getShortURL(data['eventData']['buildUrl']) + ) diff --git a/local/handler/GithubHandler.py b/local/handler/GithubHandler.py index 6b2dd30..ce6edd2 100644 --- a/local/handler/GithubHandler.py +++ b/local/handler/GithubHandler.py @@ -35,6 +35,7 @@ import StatusHandler import TravisHandler import MessageHandler import ReleaseHandler +import AppVeyorHandler import CreateDeleteHandler import IssueCommentHandler @@ -178,6 +179,8 @@ class GithubHandler(BaseHTTPServer.BaseHTTPRequestHandler): PingHandler.handle(data, theme) elif 'message' in data: MessageHandler.handle(data, theme) + elif 'eventName' in data: + AppVeyorHandler.handle(data, theme) else: theme.unknown(eventType) |