ephemeris_forge_forgejo/api/model/webhooks.rs
1use facet::Facet;
2
3/// A repository webhook as Forgejo reports it.
4///
5/// The kind stays an open string, because Forgejo has hook types that the spec
6/// does not list.
7#[derive(Clone, Debug, Default, Eq, Facet, PartialEq)]
8pub struct Hook {
9 /// The hook's numeric identifier, which addresses it in later writes.
10 pub id: i64,
11 /// The kind of hook.
12 #[facet(rename = "type")]
13 pub kind: Option<String>,
14 /// The delivery URL.
15 pub url: Option<String>,
16 /// The body format of a delivery.
17 pub content_type: Option<String>,
18 /// The events that trigger a delivery.
19 pub events: Option<Vec<String>>,
20 /// Whether Forgejo delivers events.
21 pub active: Option<bool>,
22 /// The glob of branches that trigger push events.
23 pub branch_filter: Option<String>,
24 /// The authorization header, in clear text.
25 pub authorization_header: Option<String>,
26}