32 lines
1.1 KiB
Rust
32 lines
1.1 KiB
Rust
![]() |
use serde::Deserialize;
|
||
|
use serde::Serialize;
|
||
|
|
||
|
/// The webhook_bridge.toml file that lives inside repos that have their CI triggered by webhook_bridge.
|
||
|
#[derive(Serialize, Deserialize, Clone, Debug)]
|
||
|
pub(crate) struct InRepoConfig {
|
||
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||
|
pub(crate) version: Option<String>,
|
||
|
|
||
|
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||
|
pub(crate) push: Vec<TriggerPush>,
|
||
|
}
|
||
|
|
||
|
/// A config for a job that is triggered by a push to a git repo.
|
||
|
#[derive(Serialize, Deserialize, Clone, Debug)]
|
||
|
pub(crate) struct TriggerPush {
|
||
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||
|
pub(crate) name: Option<String>,
|
||
|
|
||
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||
|
pub(crate) source: Option<String>,
|
||
|
|
||
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||
|
pub(crate) clone_uri: Option<String>,
|
||
|
|
||
|
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||
|
pub(crate) branches: Vec<String>,
|
||
|
|
||
|
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||
|
pub(crate) skip_branches: Vec<String>,
|
||
|
}
|