Skip to content

Test the push repository webhook

POST
/repos/{owner}/{repo}/hooks/{hook_id}/tests

This will trigger the hook with the latest push to the current repository if the hook is subscribed to push events. If the hook is not subscribed to push events, the server will respond with 204 but no test POST will be generated.

[!NOTE] Previously /repos/:owner/:repo/hooks/:hook_id/test

API method documentation

owner
required
string

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

repo
required
string

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

hook_id
required
integer

The unique identifier of the hook. You can find this value in the X-GitHub-Hook-ID header of a webhook delivery.

Response

Resource not found

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}