summaryrefslogtreecommitdiffstats
path: root/gitautodeploy/httpserver.py
diff options
context:
space:
mode:
authorxohozu <xohozu@gmail.com>2016-07-16 14:36:26 +0800
committerxohozu <xohozu@gmail.com>2016-07-16 14:36:26 +0800
commit654c925b66c2ff09bfe20cf9d5eaa4929cf78da6 (patch)
tree0d75a356e875f648aac9132e3da1a2f8f7421dae /gitautodeploy/httpserver.py
parent8a4cea84cf19b3ae6df9c0960a1b41270a304a49 (diff)
downloadGit-Auto-Deploy-654c925b66c2ff09bfe20cf9d5eaa4929cf78da6.zip
Git-Auto-Deploy-654c925b66c2ff09bfe20cf9d5eaa4929cf78da6.tar.gz
Git-Auto-Deploy-654c925b66c2ff09bfe20cf9d5eaa4929cf78da6.tar.bz2
Supports Coding repository management
https://coding.net
Diffstat (limited to 'gitautodeploy/httpserver.py')
-rw-r--r--gitautodeploy/httpserver.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/gitautodeploy/httpserver.py b/gitautodeploy/httpserver.py
index d9310d1..ffd6092 100644
--- a/gitautodeploy/httpserver.py
+++ b/gitautodeploy/httpserver.py
@@ -128,8 +128,12 @@ class WebhookRequestHandler(BaseHTTPRequestHandler):
user_agent = 'user-agent' in request_headers and request_headers['user-agent']
content_type = 'content-type' in request_headers and request_headers['content-type']
+ # Assume Coding if the X-Coding-Event HTTP header is set
+ if 'x-coding-event' in request_headers:
+ return parsers.CodingRequestParser
+
# Assume GitLab if the X-Gitlab-Event HTTP header is set
- if 'x-gitlab-event' in request_headers:
+ elif 'x-gitlab-event' in request_headers:
# Special Case for Gitlab CI
if content_type == "application/json" and "build_status" in data: