aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
AgeCommit message (Collapse)Author
2017-11-13Log response body of HTTP callsTeddy Wing
Log the HTTP response bodies to see if there's something we can gather from our connected services' API responses.
2017-11-12Add license (GNU GPLv3+)Teddy Wing
Add COPYING file and license notices to sources.
2017-11-10main(): Make endpoint to handle GitHub webhookTeddy Wing
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.
2017-11-08Add rough code for `update_commit_status`Teddy Wing
This new function will make a request to the GitHub REST API to update the status of a commit using the given arguments. * Create a new `github` module for this to live in. * Uses `mockito` to check that the request was made. * The `API_URL` is necessary in order to set up 'mockito' to work properly. That pattern is lifted from an example in the crate's docs: http://lipanski.github.io/mockito/generated/mockito/index.html#example * Sort of make a POST request to the GitHub API to update the status. This doesn't actually work, though, of course, as it's incomplete. For one thing, we haven't even included the 'reqwest' library, and for another we need a way to get the GitHub owner name to build the API URL.
2017-11-08af83.rs: Add `job_name` to get name of Jenkins jobsTeddy Wing
A new af83 module for non-general code. The `job_name` function will turn a commit reference into a job name string. This job name corresponds to the names of branch builds in Jenkins, and is a custom format, specific to af83.
2017-11-07Add modules for GitHub and Jenkins interactionTeddy Wing
Empty stub modules that will be filled in with the communication code.