From ce8ae73fe14711924f3afcbcd95cf56270b806a5 Mon Sep 17 00:00:00 2001 From: Sebastian Wilzbach Date: Sun, 16 Jul 2017 02:32:46 +0200 Subject: [PATCH] Add simple codecov_hook endpoint to log received messages --- source/dlangbot/app.d | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/dlangbot/app.d b/source/dlangbot/app.d index d1ce888..8d03f2c 100644 --- a/source/dlangbot/app.d +++ b/source/dlangbot/app.d @@ -45,6 +45,7 @@ void startServer(HTTPServerSettings settings) .post("/github_hook", &githubHook) .match(HTTPMethod.HEAD, "/trello_hook", (req, res) => res.writeVoidBody) .post("/trello_hook", &trelloHook) + .post("/codecov_hook", &codecovHook) ; HTTPClient.setUserAgentString("dlang-bot vibe.d/"~vibeVersionString); @@ -229,6 +230,14 @@ void handlePR(string action, PullRequest* _pr) //============================================================================== +void codecovHook(HTTPServerRequest req, HTTPServerResponse res) +{ + logDebug("codecovHook: %s", req.bodyReader.readAllUTF8); + return res.writeBody("OK"); +} + +//============================================================================== + version (unittest) {} else void main(string[] args) {