feat(server): add deserialise types for commit status

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,
}