astro_run/types/
trigger_event.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Serialize, Deserialize, Debug, Clone)]
4pub struct TriggerEvent {
5 pub event: String,
7 pub repo_owner: String,
8 pub repo_name: String,
9 pub pr_number: Option<i64>,
10 pub sha: String,
11 pub branch: String,
12 pub ref_name: String,
14}
15
16impl Default for TriggerEvent {
17 fn default() -> Self {
18 Self {
19 event: "push".to_string(),
20 repo_owner: "panghu-huang".to_string(),
21 repo_name: "astro-run".to_string(),
22 ref_name: "refs/heads/main".to_string(),
23 branch: "main".to_string(),
24 sha: "123456".to_string(),
25 pr_number: None,
26 }
27 }
28}