Skip to content

Commit bcd1943

Browse files
authored
Merge pull request #136 from wilzbach/codecov_hook
Add simple codecov_hook endpoint to log received messages merged-on-behalf-of: Sebastian Wilzbach <[email protected]>
2 parents 2414ccc + ce8ae73 commit bcd1943

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

source/dlangbot/app.d

+9
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ void startServer(HTTPServerSettings settings)
4545
.post("/github_hook", &githubHook)
4646
.match(HTTPMethod.HEAD, "/trello_hook", (req, res) => res.writeVoidBody)
4747
.post("/trello_hook", &trelloHook)
48+
.post("/codecov_hook", &codecovHook)
4849
;
4950

5051
HTTPClient.setUserAgentString("dlang-bot vibe.d/"~vibeVersionString);
@@ -229,6 +230,14 @@ void handlePR(string action, PullRequest* _pr)
229230

230231
//==============================================================================
231232

233+
void codecovHook(HTTPServerRequest req, HTTPServerResponse res)
234+
{
235+
logDebug("codecovHook: %s", req.bodyReader.readAllUTF8);
236+
return res.writeBody("OK");
237+
}
238+
239+
//==============================================================================
240+
232241
version (unittest) {}
233242
else void main(string[] args)
234243
{

0 commit comments

Comments
 (0)