feat(server): add deserialise types for commit status
All checks were successful
ci/woodpecker/push/docker Pipeline was successful
ci/woodpecker/push/builder Pipeline was successful
ci/woodpecker/push/release Pipeline was successful
ci/woodpecker/push/todo-check Pipeline was successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
Paul Campbell 2024-04-09 22:45:04 +01:00
parent ad7d513481
commit 8ad84bc72b

View file

@ -64,3 +64,20 @@ async fn get_commit_history(
struct Commit { struct Commit {
sha: String, sha: String,
} }
#[derive(Debug, serde::Deserialize)]
pub struct CombinedStatus {
pub state: CommitStatusState,
}
#[derive(Debug, serde::Deserialize)]
pub enum CommitStatusState {
#[serde(rename = "success")]
Success,
#[serde(rename = "pending")]
Pending,
#[serde(rename = "failure")]
Failure,
#[serde(rename = "error")]
Error,
}