From ba48634c5af91766ec701f5cca5d646646e65b89 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Thu, 9 Nov 2017 01:17:26 +0100 Subject: `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. --- src/github.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/github.rs') 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(), -- cgit v1.2.3