From 243235c86fd484e48a42e8f5a929cd50cac60a71 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Fri, 30 Nov 2018 17:45:43 -0500 Subject: [PATCH] Send checks instead of comments --- ofborg/src/tasks/githubcommentposter.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ofborg/src/tasks/githubcommentposter.rs b/ofborg/src/tasks/githubcommentposter.rs index 2111a86..6572bc9 100644 --- a/ofborg/src/tasks/githubcommentposter.rs +++ b/ofborg/src/tasks/githubcommentposter.rs @@ -46,15 +46,14 @@ impl worker::SimpleWorker for GitHubCommentPoster { let comment = hubcaps::comments::CommentOptions { body: result_to_comment(&result) }; let check = result_to_check(&result); println!(":{:?}", check); + println!(":{:?}", comment); - let comment_attempt = self.github + let check_create_attempt = self.github .repo(result.repo.owner.clone(), result.repo.name.clone()) - .pulls() - .get(result.pr.number) - .comments() - .create(&comment); + .checkruns() + .create(&check); - match comment_attempt { + match check_create_attempt { Ok(comment) => { info!("Successfully sent {:?} to {}", comment, @@ -63,7 +62,7 @@ impl worker::SimpleWorker for GitHubCommentPoster { } Err(err) => { info!( - "Failed to send comment {:?} to {}", + "Failed to send check {:?} to {}", err, result.pr.number, )