summaryrefslogtreecommitdiff
path: root/ofborg/tickborg/src/message/common.rs
blob: 75b5dec04f6b62906e9200fb527d46c74029f4e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone)]
pub struct Repo {
    pub owner: String,
    pub name: String,
    pub full_name: String,
    pub clone_url: String,
}

#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
pub struct Pr {
    pub target_branch: Option<String>,
    pub number: u64,
    pub head_sha: String,
}

/// Information about a push event trigger (direct push to a branch).
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
pub struct PushTrigger {
    pub head_sha: String,
    pub branch: String,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub before_sha: Option<String>,
}