From 5ffd5313eefd7a134cbcd2798c36593cb4f340de Mon Sep 17 00:00:00 2001 From: backwardspy Date: Fri, 27 Sep 2024 10:19:00 +0100 Subject: [PATCH] add additional webhook model fields (#696) * feat: add assignee to issues * feat: support owner and name repo change fields --- src/models/webhook_events/payload/issues.rs | 1 + src/models/webhook_events/payload/repository.rs | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/models/webhook_events/payload/issues.rs b/src/models/webhook_events/payload/issues.rs index cf679bfb..d0eac5e1 100644 --- a/src/models/webhook_events/payload/issues.rs +++ b/src/models/webhook_events/payload/issues.rs @@ -43,4 +43,5 @@ pub enum IssuesWebhookEventAction { pub struct IssuesWebhookEventChanges { pub body: Option>, pub title: Option>, + pub assignee: Option>, } diff --git a/src/models/webhook_events/payload/repository.rs b/src/models/webhook_events/payload/repository.rs index b90c6a45..329090a8 100644 --- a/src/models/webhook_events/payload/repository.rs +++ b/src/models/webhook_events/payload/repository.rs @@ -1,5 +1,7 @@ use serde::{Deserialize, Serialize}; +use crate::models::Author; + use super::OldValue; #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] @@ -32,4 +34,18 @@ pub struct RepositoryWebhookEventChanges { pub description: Option>>, pub homepage: Option>>, pub topics: Option>>>, + pub owner: Option>, + pub repository: Option, +} + +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[non_exhaustive] +pub struct RepositoryWebhookEventChangesOwner { + pub user: Author, +} + +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[non_exhaustive] +pub struct RepositoryWebhookEventChangesRepository { + pub name: Option>, }