aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorTeddy Wing2017-11-10 02:10:49 +0100
committerTeddy Wing2017-11-10 02:10:49 +0100
commitafe029ca9a29fc73935ae3441aaad9e68f6ed34b (patch)
tree07d6c37390f7195b6d2bc38c2d0a5d2a1ad4dcb2 /src/lib.rs
parente5e44f9e7c2cc1d959fe0542fc81c4b9b792cded (diff)
downloadkipper-afe029ca9a29fc73935ae3441aaad9e68f6ed34b.tar.bz2
main(): Make endpoint to handle GitHub webhook
Convert our dummy test route to a real one that will handle webhooks coming from GitHub. It will parse the POST body data and create a `CommitRef` from it. That `CommitRef` then gets passed to `find_and_track_build_and_update_status()` to update the pull request status based on Jenkins' build results. A 202 response seemed apt here. Quoting https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html: > 10.2.3 202 Accepted > > The request has been accepted for processing, but the processing has > not been completed. The request might or might not eventually be acted > upon, as it might be disallowed when processing actually takes place. > There is no facility for re-sending a status code from an asynchronous > operation such as this.
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index add79dd..a4cfffb 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,4 +1,5 @@
-mod pull_request;
+pub mod jenkins;
+pub mod pull_request;
+
mod github;
-mod jenkins;
mod af83;