summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbackwardspy <backwardspy@pigeon.life>2024-09-27 10:19:00 +0100
committerGitHub <noreply@github.com>2024-09-27 11:19:00 +0200
commit5ffd5313eefd7a134cbcd2798c36593cb4f340de (patch)
tree829e6b57ac54edebb8878c6ddcfbe58046d81c3e
parent53e3d4f403426455b862b0efb02eff513cd6779b (diff)
add additional webhook model fields (#696)
* feat: add assignee to issues * feat: support owner and name repo change fields
-rw-r--r--src/models/webhook_events/payload/issues.rs1
-rw-r--r--src/models/webhook_events/payload/repository.rs16
2 files changed, 17 insertions, 0 deletions
diff --git a/src/models/webhook_events/payload/issues.rs b/src/models/webhook_events/payload/issues.rs
index cf679bf..d0eac5e 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<OldValue<String>>,
pub title: Option<OldValue<String>>,
+ pub assignee: Option<OldValue<Author>>,
}
diff --git a/src/models/webhook_events/payload/repository.rs b/src/models/webhook_events/payload/repository.rs
index b90c6a4..329090a 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<OldValue<Option<String>>>,
pub homepage: Option<OldValue<Option<String>>>,
pub topics: Option<OldValue<Option<Vec<String>>>>,
+ pub owner: Option<OldValue<RepositoryWebhookEventChangesOwner>>,
+ pub repository: Option<RepositoryWebhookEventChangesRepository>,
+}
+
+#[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<OldValue<String>>,
}