diff --git a/github/dbtool/src/main.rs b/github/dbtool/src/main.rs index fd6ca7a..13b6528 100644 --- a/github/dbtool/src/main.rs +++ b/github/dbtool/src/main.rs @@ -297,7 +297,11 @@ async fn do_delivery_list(mut l: Level) -> Result<()> { match serde_json::from_value::(del.payload.0) { Ok(payload) => { r.add_str("action", &payload.action); - r.add_str("sender", &payload.sender.login); + if let Some(sender) = &payload.sender { + r.add_str("sender", &sender.login); + } else { + r.add_str("sender", "-"); + } if let Some(inst) = &payload.installation { r.add_str("install", inst.id.to_string()); } else { diff --git a/github/hooktypes/src/lib.rs b/github/hooktypes/src/lib.rs index dbfa648..588df95 100644 --- a/github/hooktypes/src/lib.rs +++ b/github/hooktypes/src/lib.rs @@ -9,7 +9,7 @@ use serde::Deserialize; pub struct Payload { #[serde(default)] pub action: String, - pub sender: User, + pub sender: Option, pub repository: Option, pub installation: Option, pub check_suite: Option, @@ -115,11 +115,11 @@ pub struct PullRequest { #[derive(Deserialize, Debug)] pub struct PullRequestCommit { - pub label: String, + pub label: Option, #[serde(rename = "ref")] pub ref_: String, pub sha: String, - pub user: User, + pub user: Option, pub repo: Option, }