Skip to content

Commit

Permalink
fix #5 add 'canceling' pipeline status and unknown fallback'
Browse files Browse the repository at this point in the history
  • Loading branch information
junkdog committed Oct 5, 2024
1 parent 2b93ada commit 6ed0ccd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,4 +305,4 @@ impl GitlabApiError {
pub fn description(&self) -> String {
self.error_description.clone().unwrap_or("".to_string())
}
}
}
6 changes: 5 additions & 1 deletion src/domain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,13 @@ pub enum PipelineStatus {
Running,
Success,
Failed,
Canceling,
Canceled,
Skipped,
Manual,
Scheduled,
#[serde(other)]
Unknown,
}

#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Deserialize, Default)]
Expand Down Expand Up @@ -520,9 +523,11 @@ impl IconRepresentable for PipelineStatus {
PipelineStatus::Success => "🟢",
PipelineStatus::Failed => "🔴",
PipelineStatus::Canceled => "🚫",
PipelineStatus::Canceling => "🚫",
PipelineStatus::Skipped => "⚫",
PipelineStatus::Manual => "🟣",
PipelineStatus::Scheduled => "📅",
PipelineStatus::Unknown => "❓",
}.to_string()
}
}
Expand All @@ -540,4 +545,3 @@ impl IconRepresentable for Pipeline {
.unwrap_or(self.status.icon())
}
}

2 changes: 0 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ fn main() -> Result<()> {
println!("{}", config_path.display());
exit(0);
}


let debug = std::env::var("GLIM_DEBUG").is_ok();

// event handler
Expand Down

0 comments on commit 6ed0ccd

Please sign in to comment.