1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
use serde::{Deserialize, Serialize};
use crate::models::{issues::Issue, Author, Label, Milestone};
use super::OldValue;
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[non_exhaustive]
pub struct IssuesWebhookEventPayload {
pub action: IssuesWebhookEventAction,
pub assignee: Option<Author>,
pub enterprise: Option<serde_json::Value>,
pub issue: Issue,
pub milestone: Option<Milestone>,
pub label: Option<Label>,
pub changes: Option<IssuesWebhookEventChanges>,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
#[non_exhaustive]
pub enum IssuesWebhookEventAction {
Assigned,
Closed,
Deleted,
Demilestoned,
Edited,
Labeled,
Locked,
Milestoned,
Opened,
Pinned,
Reopened,
Transferred,
Unassigned,
Unlabeled,
Unlocked,
Unpinned,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[non_exhaustive]
pub struct IssuesWebhookEventChanges {
pub body: Option<OldValue<String>>,
pub title: Option<OldValue<String>>,
}
|