diff options
author | Teddy Wing | 2017-11-09 01:01:26 +0100 |
---|---|---|
committer | Teddy Wing | 2017-11-09 01:01:26 +0100 |
commit | df0b5cd4b3c4af93019e2f628fa32101242d4ec2 (patch) | |
tree | 5d75195c2fce319c57d95b5b0f4b9ab420e874cc /src | |
parent | a05849f435d72c342671c53ef6f1bd8b87ff25a7 (diff) | |
download | kipper-df0b5cd4b3c4af93019e2f628fa32101242d4ec2.tar.bz2 |
github.rs: `update_commit_status` needs organisation name
I wasn't thinking straight in 26b74edece4546378c8a853cc70f7388f20ff0c6.
Instead of taking a repo name, we need to take an organisation/user
name. The repo name we already have from `commit_ref.repo`. We were
missing the org to be able to properly construct the GitHub API URL.
Pass `organization_name` name around from
`find_and_track_build_and_update_status`.
Diffstat (limited to 'src')
-rw-r--r-- | src/github.rs | 4 | ||||
-rw-r--r-- | src/jenkins.rs | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/github.rs b/src/github.rs index f8bf97d..d246c4e 100644 --- a/src/github.rs +++ b/src/github.rs @@ -33,7 +33,7 @@ impl fmt::Display for CommitStatus { } pub fn update_commit_status( - repo_name: String, + organization_name: String, commit_ref: CommitRef, state: CommitStatus, target_url: String, @@ -55,7 +55,7 @@ pub fn update_commit_status( &format!( "{}/repos/{}/{}/statuses/{}", API_URL, - repo_name, + organization_name, commit_ref.repo, commit_ref.sha ) diff --git a/src/jenkins.rs b/src/jenkins.rs index b6a10a5..9868b50 100644 --- a/src/jenkins.rs +++ b/src/jenkins.rs @@ -65,6 +65,7 @@ impl Job { } pub fn find_and_track_build_and_update_status( + organization_name: String, repo_name: String, commit_ref: CommitRef ) { @@ -79,7 +80,7 @@ pub fn find_and_track_build_and_update_status( // Start timer github::update_commit_status( - repo_name, + organization_name, commit_ref, job.commit_status().result, job_url, |