Age | Commit message (Collapse) | Author |
|
Now that our functions return `Result`s for errors instead of panicking,
we need to handle these errors. For now, just respond with a 500. We'll
also want to log the errors though.
|
|
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.
|
|
Print a simple text message on 404 for human consumption. Makes it more
obvious than finding out the response status code in a browser.
|
|
Basic web server and dummy response using 'rouille'.
|
|
Initialised new project with:
$ cargo init --bin kipper
Rust 1.16.0. (I know, it's super old, but that's what I have on my
machine right now without going out to get the latest version.)
|