diff options
author | Teddy Wing | 2017-11-09 00:57:46 +0100 |
---|---|---|
committer | Teddy Wing | 2017-11-09 00:59:35 +0100 |
commit | a05849f435d72c342671c53ef6f1bd8b87ff25a7 (patch) | |
tree | 0c57781fb35da64d885b856730d8ee40d7450745 /src | |
parent | 26b74edece4546378c8a853cc70f7388f20ff0c6 (diff) | |
download | kipper-a05849f435d72c342671c53ef6f1bd8b87ff25a7.tar.bz2 |
jenkins.rs: Take repo name in `find_and_track...`
This function should take a repo name so we can pass that information to
`get_jobs`, as well as `update_commit_status`.
Also add types to the parameters which I apparently didn't think to do
the first time.
Diffstat (limited to 'src')
-rw-r--r-- | src/jenkins.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/jenkins.rs b/src/jenkins.rs index d87c508..b6a10a5 100644 --- a/src/jenkins.rs +++ b/src/jenkins.rs @@ -31,6 +31,7 @@ use self::reqwest::header::{Authorization, Basic}; use self::url::Url; use af83; +use github; use pull_request::CommitRef; #[cfg(not(test))] @@ -63,8 +64,11 @@ impl Job { } } -pub fn find_and_track_build_and_update_status(commit_ref) { - let jobs = get_jobs(); +pub fn find_and_track_build_and_update_status( + repo_name: String, + commit_ref: CommitRef +) { + let jobs = get_jobs(repo_name); for job_url in jobs { let job = request_job(job_url); @@ -75,6 +79,7 @@ pub fn find_and_track_build_and_update_status(commit_ref) { // Start timer github::update_commit_status( + repo_name, commit_ref, job.commit_status().result, job_url, |