update_status: also return a CommitStatusError

This commit is contained in:
Graham Christensen 2020-04-06 06:40:53 -04:00
parent f02c7382cc
commit 00478e9dee
No known key found for this signature in database
GPG key ID: FE918C3A98C1030F

View file

@ -161,7 +161,7 @@ impl<'a, E: stats::SysEvents + 'static> OneEval<'a, E> {
description: String,
url: Option<String>,
state: hubcaps::statuses::State,
) -> Result<(), hubcaps::Error> {
) -> Result<(), CommitStatusError> {
let description = if description.len() >= 140 {
warn!(
"description is over 140 char; truncating: {:?}",
@ -189,6 +189,7 @@ impl<'a, E: stats::SysEvents + 'static> OneEval<'a, E> {
.statuses()
.create(&self.job.pr.head_sha, &builder.build())
.map(|_| ())
.map_err(|e| CommitStatusError::from(e))
}
fn make_gist(