From c3eac830c7713f2e2740b95fe2ef3664ae0a021d Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 12 Nov 2017 19:22:52 +0100 Subject: update_commit_status(): Pass GitHub token from command line argument Take the GitHub API token as a parameter and pass it through from `find_and_track_build_and_update_status()`. --- src/github.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/github.rs') diff --git a/src/github.rs b/src/github.rs index 731d261..83a5526 100644 --- a/src/github.rs +++ b/src/github.rs @@ -34,6 +34,7 @@ impl fmt::Display for CommitStatus { } pub fn update_commit_status( + github_token: &String, commit_ref: &CommitRef, state: &CommitStatus, target_url: String, @@ -68,7 +69,7 @@ pub fn update_commit_status( .header( Authorization( Bearer { - token: "token".to_owned() + token: github_token.to_owned() } ) ) -- cgit v1.2.3