aboutsummaryrefslogtreecommitdiffstats
path: root/local/handler
diff options
context:
space:
mode:
authorkongr45gpen <electrovesta@gmail.com>2017-05-07 14:43:14 +0300
committerkongr45gpen <electrovesta@gmail.com>2017-05-07 14:43:14 +0300
commit03aad42d43471714aba380159b2e68ef1ac2d4a7 (patch)
treec2042415155b072eebd3dd3309aecabddcc7c84a /local/handler
parent2771ccfa74de49100a88a0cdd38ee4e5a84afcbc (diff)
downloadsupybot_github-03aad42d43471714aba380159b2e68ef1ac2d4a7.tar.gz
supybot_github-03aad42d43471714aba380159b2e68ef1ac2d4a7.tar.bz2
supybot_github-03aad42d43471714aba380159b2e68ef1ac2d4a7.zip
Add support for Netlify
Diffstat (limited to 'local/handler')
-rw-r--r--local/handler/GithubHandler.py3
-rw-r--r--local/handler/NetlifyHandler.py13
2 files changed, 16 insertions, 0 deletions
diff --git a/local/handler/GithubHandler.py b/local/handler/GithubHandler.py
index 362917f..0c3a0dc 100644
--- a/local/handler/GithubHandler.py
+++ b/local/handler/GithubHandler.py
@@ -34,6 +34,7 @@ import IssueHandler
import StatusHandler
import TravisHandler
import MessageHandler
+import NetlifyHandler
import ReleaseHandler
import UnknownHandler
import AppVeyorHandler
@@ -166,6 +167,8 @@ class GithubHandler(BaseHTTPServer.BaseHTTPRequestHandler):
TravisHandler.handle(data, theme)
elif 'pages' in data:
WikiHandler.handle(data, theme)
+ elif 'screenshot_url' in data:
+ NetlifyHandler.handle(data, theme)
elif 'state' in data:
StatusHandler.handle(data, theme)
elif 'commits' in data:
diff --git a/local/handler/NetlifyHandler.py b/local/handler/NetlifyHandler.py
new file mode 100644
index 0000000..daa802f
--- /dev/null
+++ b/local/handler/NetlifyHandler.py
@@ -0,0 +1,13 @@
+from ..utility import *
+
+def handle(data, theme):
+ if isStatusVisible(data['site_id'], data['state'].lower(), 'showSuccessfulDeployMessages'):
+ theme.deployment(
+ branch = data['branch'],
+ repo = data['name'],
+ status = data['state'],
+ commitId = data['commit_ref'],
+ commitMessage = data['title'],
+ commitAuthor = data['commit_url'].split('/')[3], #TODO: Make this show the proper author
+ url = getShortURL(data['url'])
+ )

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