Send checks instead of comments

This commit is contained in:
Graham Christensen 2018-11-30 17:45:43 -05:00
parent 1986c6fba7
commit 243235c86f
No known key found for this signature in database
GPG key ID: ACA1C1D120C83D5C

View file

@ -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,
)