Skip to content
This repository was archived by the owner on Jun 16, 2021. It is now read-only.

Commit d377697

Browse files
committed
Handle page_build event
1 parent 84c9c6c commit d377697

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

github/__init__.py

+12
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ def webhook():
112112
handle_pull_request_event(data)
113113
elif event == 'status':
114114
pass
115+
elif event == 'page_build':
116+
handle_page_build(data)
115117
else:
116118
handle_unimplemented_event(data, event)
117119
except Exception as e:
@@ -239,6 +241,16 @@ def handle_pull_request_event(data):
239241
url))
240242

241243

244+
def handle_page_build(data):
245+
if data['build']['status'] != 'built':
246+
return
247+
248+
bot_say("{} {} just deployed {}".format(COLOR_PREFIX,
249+
data['pull_request']['user']['login'],
250+
data['repository']['name']
251+
))
252+
253+
242254
def github_shortify(url):
243255
r = requests.post("https://git.io", data={'url':url })
244256
if r.status_code == 201:

0 commit comments

Comments
 (0)