Skip to content

IssueCommentWebhookEventPayload Missing Fields #810

@mmoreiradj

Description

@mmoreiradj

Description

The IssueCommentWebhookEventPayload struct in octocrab (v0.45.0) is missing several fields that are present in the actual GitHub webhook payload for issue comment events.

Missing Fields

Based on the actual webhook payload received from GitHub, the following fields are missing:

  1. repository - Contains repository information including owner, name, URLs, etc.
  2. sender - The user who triggered the event
  3. installation - GitHub App installation information (id and node_id)

Current Structure

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[non_exhaustive]
pub struct IssueCommentWebhookEventPayload {
    pub action: IssueCommentWebhookEventAction,
    pub changes: Option<IssueCommentWebhookEventChanges>,
    pub comment: Comment,
    pub enterprise: Option<serde_json::Value>,
    pub issue: Issue,
}

Expected Structure

The payload should include:

pub struct IssueCommentWebhookEventPayload {
    pub action: IssueCommentWebhookEventAction,
    pub changes: Option<IssueCommentWebhookEventChanges>,
    pub comment: Comment,
    pub enterprise: Option<serde_json::Value>,
    pub issue: Issue,
    pub repository: Repository,        // MISSING
    pub sender: Author,                 // MISSING
    pub installation: Option<Installation>, // MISSING
}

Impact

Without these fields, consumers of this struct cannot:

  • Identify which repository the comment was made in
  • Identify who triggered the event
  • Access installation information for GitHub Apps

Reference

I'm willing to create a PR to support them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions