fix(forgejo): treat a blank status check result as pending

Closes kemitix/git-next#29
This commit is contained in:
Paul Campbell 2024-04-12 13:51:56 +01:00
parent 869935dfc2
commit e8d174ee84

View file

@ -133,6 +133,7 @@ pub async fn get_commit_status(
CommitStatusState::Pending => Status::Pending, CommitStatusState::Pending => Status::Pending,
CommitStatusState::Failure => Status::Fail, CommitStatusState::Failure => Status::Fail,
CommitStatusState::Error => Status::Fail, CommitStatusState::Error => Status::Fail,
CommitStatusState::Blank => Status::Pending,
}, },
None => { None => {
warn!("No status found for commit"); warn!("No status found for commit");
@ -162,4 +163,6 @@ pub enum CommitStatusState {
Failure, Failure,
#[serde(rename = "error")] #[serde(rename = "error")]
Error, Error,
#[serde(rename = "")]
Blank,
} }