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

Commit 84c9c6c

Browse files
committed
Add ignored events
1 parent be33bb0 commit 84c9c6c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

github/__init__.py

+8
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
COLOR_RESET = '\x0F'
3535
COLOR_PREFIX = '[%sgit%s]' % (COLOR_NETWORK, COLOR_RESET)
3636

37+
IGNORED_EVENTS = {
38+
'deployment',
39+
'deployment_status',
40+
}
3741

3842
app = Flask(__name__)
3943
bot_global = None
@@ -72,6 +76,10 @@ def webhook():
7276
from flask import request
7377

7478
event = request.headers.get('X-GitHub-Event')
79+
80+
if event in IGNORED_EVENTS:
81+
return "OK"
82+
7583
try:
7684
webhook_secret = bot_global.config.github.webhook_secret
7785
hash_gh = request.headers.get('X-Hub-Signature')

0 commit comments

Comments
 (0)