aboutsummaryrefslogtreecommitdiffstats
path: root/src/jenkins.rs
diff options
context:
space:
mode:
authorTeddy Wing2017-11-08 01:37:10 +0100
committerTeddy Wing2017-11-08 01:37:10 +0100
commit8d3a48ec18b7235c6284d982563822f9df89cb73 (patch)
treec99d8aeb1c21e42766cdbb542ab4f1ae06751862 /src/jenkins.rs
parent0e6fad71021dfda057936cb9ce79a33706cb4967 (diff)
downloadkipper-8d3a48ec18b7235c6284d982563822f9df89cb73.tar.bz2
jenkins.rs: Add a `Job` type
This will avoid having to parse a job JSON payload multiple times. We should do the parsing once, extract the data we need, and pass the resulting struct around instead.
Diffstat (limited to 'src/jenkins.rs')
-rw-r--r--src/jenkins.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/jenkins.rs b/src/jenkins.rs
index 8965c6a..6c34f6c 100644
--- a/src/jenkins.rs
+++ b/src/jenkins.rs
@@ -33,6 +33,11 @@ pub enum JobStatus {
Unknown,
}
+struct Job {
+ display_name: String,
+ result: String,
+}
+
pub fn update_commit_status(commit_ref) {
let jobs = get_jobs();