reposGetWebhookConfigForRepo
Get a webhook configuration for a repository
Details
- Method:
GET - Path:
/repos/{owner}/{repo}/hooks/{hook_id}/config - Operation ID:
repos/get-webhook-config-for-repo
Parameters
{
"owner": {
"description": "The account owner of the repository. The name is not case sensitive.",
"required": true,
"location": "path",
"type": "string"
},
"repo": {
"description": "The name of the repository without the `.git` extension. The name is not case sensitive.",
"required": true,
"location": "path",
"type": "string"
},
"hook_id": {
"description": "The unique identifier of the hook. You can find this value in the `X-GitHub-Hook-ID` header of a webhook delivery.",
"required": true,
"location": "path",
"type": "integer"
}
}Response Schema
{
"title": "Webhook Configuration",
"description": "Configuration object of the webhook",
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "The URL to which the payloads will be delivered.",
"example": "https://example.com/webhook",
"format": "uri"
},
"content_type": {
"type": "string",
"description": "The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`.",
"example": "\"json\""
},
"secret": {
"type": "string",
"description": "If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/webhooks/event-payloads/#delivery-headers).",
"example": "\"********\""
},
"insecure_ssl": {
"oneOf": [
{
"type": "string",
"description": "Determines whether the SSL certificate of the host for `url` will be verified when delivering payloads. Supported values include `0` (verification is performed) and `1` (verification is not performed). The default is `0`. **We strongly recommend not setting this to `1` as you are subject to man-in-the-middle and other attacks.**",
"example": "\"0\""
},
{
"type": "number"
}
]
}
}
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('github')
# Call this tool
result = await agent.call_tool('reposGetWebhookConfigForRepo', {
# Add required parameters here
})