Understand the structure of a webhook definition
mainA webhook definition describes the available events for a specific resource. It typically includes:
name: The name of the webhook event (e.g.,issues).actions: A list of specific actions that trigger this webhook (e.g.,opened,edited,closed).examples: An array of example payloads that demonstrate the data structure for different actions within that event.
Each example payload contains the specific data related to the action, such as the resource being modified, the repository context, and the sender of the event.
{
"name": "issues",
"actions": [
"opened",
"edited",
"deleted"
],
"examples": [
{
"action": "edited",
"issue": { ... },
"repository": { ... },
"sender": { ... }
}
]
}