Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add additional webhook model fields #696

Merged
merged 2 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/models/webhook_events/payload/issues.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>>,
}
16 changes: 16 additions & 0 deletions src/models/webhook_events/payload/repository.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use serde::{Deserialize, Serialize};

use crate::models::Author;

use super::OldValue;

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
Expand Down Expand Up @@ -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>>,
}
Loading