aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2017-11-09 01:17:26 +0100
committerTeddy Wing2017-11-09 01:17:26 +0100
commitba48634c5af91766ec701f5cca5d646646e65b89 (patch)
tree6c4baf7c54dbb402e3978931577b02b0ad10be56
parent254fa3fb4411f96ecd02f0c69a89ba5f2a5c8c95 (diff)
downloadkipper-ba48634c5af91766ec701f5cca5d646646e65b89.tar.bz2
`update_commit_status`: Remove `organization_name` argument
Now that the organisation name (rather, owner of a GitHub project) is stored in `CommitRef`, we don't need to pass it in explicitly.
-rw-r--r--src/github.rs4
-rw-r--r--src/jenkins.rs2
2 files changed, 1 insertions, 5 deletions
diff --git a/src/github.rs b/src/github.rs
index 325f6bf..c5cedca 100644
--- a/src/github.rs
+++ b/src/github.rs
@@ -33,7 +33,6 @@ impl fmt::Display for CommitStatus {
}
pub fn update_commit_status(
- organization_name: String,
commit_ref: CommitRef,
state: CommitStatus,
target_url: String,
@@ -55,7 +54,7 @@ pub fn update_commit_status(
&format!(
"{}/repos/{}/{}/statuses/{}",
API_URL,
- organization_name,
+ commit_ref.owner,
commit_ref.repo,
commit_ref.sha
)
@@ -91,7 +90,6 @@ mod tests {
};
update_commit_status(
- "octocat".to_string(),
commit_ref,
CommitStatus::Success,
"https://jenkins.example.com/job/octocat/3".to_string(),
diff --git a/src/jenkins.rs b/src/jenkins.rs
index 37e5879..1e98a01 100644
--- a/src/jenkins.rs
+++ b/src/jenkins.rs
@@ -65,7 +65,6 @@ impl Job {
}
pub fn find_and_track_build_and_update_status(
- organization_name: String,
repo_name: String,
commit_ref: CommitRef
) {
@@ -80,7 +79,6 @@ pub fn find_and_track_build_and_update_status(
// Start timer
github::update_commit_status(
- organization_name,
commit_ref,
job.commit_status().result,
job_url,