provider repos POST /repos/{owner}/{repo}/hooks
@utdk/github /repos/{owner}/{repo}/hooks
Create a repository webhook
Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can share the same `config` as long as those webhooks do not have any `events` that overlap.
owner path required
The account owner of the repository. The name is not case sensitive.
string
repo path required
The name of the repository without the `.git` extension. The name is not case sensitive.
string

Try it

Authentication
Configure credentials for GitHub v3 REST API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

repos.createWebhook
POST/repos/{owner}/{repo}/hooks
Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can share the same `config` as long as those webhooks do not have any `events` that overlap.

Parameters

required

The account owner of the repository. The name is not case sensitive.

required

The name of the repository without the `.git` extension. The name is not case sensitive.

Input

Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`.

Key/value pairs to provide settings for this webhook.

Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for.

Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import github from '@utdk/github';

await github.repos.createWebhook({
  "events": "push",
  "active": true
})