forgejo-hooks: Add support for issue comments
Signed-off-by: pep <pep@bouah.net>
This commit is contained in:
parent
29881089d3
commit
96353016d4
3 changed files with 248 additions and 1 deletions
|
|
@ -201,6 +201,7 @@ pub struct RemovedBranch {
|
|||
#[derive(Deserialize, Debug, PartialEq)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum IssueAction {
|
||||
Created,
|
||||
Opened,
|
||||
Edited,
|
||||
}
|
||||
|
|
@ -261,13 +262,29 @@ pub struct IssueAttrs {
|
|||
pub pin_order: u32,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug, PartialEq)]
|
||||
pub struct Comment {
|
||||
pub id: u64,
|
||||
pub html_url: String,
|
||||
pub pull_request_url: String,
|
||||
pub issue_url: String,
|
||||
pub user: User,
|
||||
pub original_author: String,
|
||||
pub original_author_id: u64,
|
||||
pub body: String,
|
||||
pub assets: Vec<String>,
|
||||
pub created_at: DateTime<Utc>,
|
||||
pub updated_at: DateTime<Utc>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug, PartialEq)]
|
||||
pub struct Issue {
|
||||
pub action: IssueAction,
|
||||
pub number: u64,
|
||||
pub changes: Option<Changes>,
|
||||
pub issue: IssueAttrs,
|
||||
pub comment: Option<Comment>,
|
||||
pub repository: Repository,
|
||||
pub is_pull: Option<bool>,
|
||||
}
|
||||
|
||||
impl From<Push> for Hook {
|
||||
|
|
|
|||
Loading…
Reference in a new issue