aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)Author
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-08pull_request.rs: Make `CommitRef` publicTeddy Wing
I had forgotten I needed to make the struct and its fields public. We need this to be able to use it outside of the module.
2017-11-08jenkins.rs: Add `result_from_job`Teddy Wing
This method will take a job JSON payload returned from the Jenkins API (http://jenkins/job/:project/:id/api/json), and return its status, success, failed, or pending. A new `JobStatus` type represents the status of jobs.
2017-11-07jenkins.rs: Add `get_jobs`, test HTTP requestTeddy Wing
Try making our first HTTP request to the Jenkins API. Use Basic authentication with our name and access token. The 'reqwest' format is based on https://doc.rust-lang.org/stable/std/string/struct.String.html Eventually this method should return a `Vec` of jobs, actually job URLs, but at least we know it works and gives us a 200.
2017-11-07jenkins.rs: Outline commit status update algorithmTeddy Wing
Comment and a rough interface definition describing how commit statuses should be updated and how Jenkins should be queried.
2017-11-07main.rs: Print message on 404Teddy Wing
Print a simple text message on 404 for human consumption. Makes it more obvious than finding out the response status code in a browser.
2017-11-07pull_request.rs: Parse JSON payload to create `CommitRef` structTeddy Wing
The test now passes, and we create our `CommitRef` struct using actual values from the parsed JSON. In order to get the branch name, we need the part after the last "/" in the "ref" key. There are a ton of `unwrap`s here, but at least it's a start and it's working now.
2017-11-07pull_request.rs: Idea to get needed data from JSON payloadTeddy Wing
Non-working app code, but the test tries to check that we get a structure with the right data given a JSON payload coming from the GitHub PushEvent webhook (copied from https://developer.github.com/v3/activity/events/types/#pushevent).
2017-11-07Add modules for GitHub and Jenkins interactionTeddy Wing
Empty stub modules that will be filled in with the communication code.
2017-11-07main.rs: Add web server and "hello world" routeTeddy Wing
Basic web server and dummy response using 'rouille'.
2017-11-07Initial commit. Cargo init.Teddy Wing
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.)