diff --git a/workspace/gh-workflow/src/event.rs b/workspace/gh-workflow/src/event.rs index f630771..4785b60 100644 --- a/workspace/gh-workflow/src/event.rs +++ b/workspace/gh-workflow/src/event.rs @@ -1,20 +1,575 @@ use derive_setters::Setters; +use indexmap::IndexMap; use serde::Serialize; +use serde_json::Value; -use crate::SetEvent; +use crate::{is_default, SetEvent}; #[derive(Serialize, Setters, Clone)] #[serde(rename_all = "snake_case")] #[setters(strip_option)] pub struct Event { + #[serde(skip_serializing_if = "is_default")] pub push: Option, + #[serde(skip_serializing_if = "is_default")] pub pull_request: Option, - // TODO: add all more events + #[serde(skip_serializing_if = "is_default")] + pub branch_protection_rule: Option, + #[serde(skip_serializing_if = "is_default")] + pub check_run: Option, + #[serde(skip_serializing_if = "is_default")] + pub check_suite: Option, + #[serde(skip_serializing_if = "is_default")] + pub create: Option, + #[serde(skip_serializing_if = "is_default")] + pub delete: Option, + #[serde(skip_serializing_if = "is_default")] + pub deployment: Option, + #[serde(skip_serializing_if = "is_default")] + pub deployment_status: Option, + #[serde(skip_serializing_if = "is_default")] + pub discussion: Option, + #[serde(skip_serializing_if = "is_default")] + pub discussion_comment: Option, + #[serde(skip_serializing_if = "is_default")] + pub fork: Option, + #[serde(skip_serializing_if = "is_default")] + pub gollum: Option, + #[serde(skip_serializing_if = "is_default")] + pub issue_comment: Option, + #[serde(skip_serializing_if = "is_default")] + pub issues: Option, + #[serde(skip_serializing_if = "is_default")] + pub label: Option