-
-
Notifications
You must be signed in to change notification settings - Fork 310
Open
Description
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:
repository- Contains repository information including owner, name, URLs, etc.sender- The user who triggered the eventinstallation- 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
- GitHub Webhook Documentation: https://docs.github.com/en/webhooks/webhook-events-and-payloads#issue_comment
- Example payload: See
other_comment.jsonin this repository
I'm willing to create a PR to support them.
Metadata
Metadata
Assignees
Labels
No labels