webhooks
Create webhooks github app
Public endpoint (no bearer token required).
POST
/
api
/
webhooks
/
github-app
Create webhooks github app
curl --request POST \
--url https://evalgate.com/api/webhooks/github-app \
--header 'Content-Type: application/json' \
--header 'X-GitHub-Delivery: <x-github-delivery>' \
--header 'X-GitHub-Event: <x-github-event>' \
--header 'X-Hub-Signature-256: <x-hub-signature-256>' \
--data '
{
"action": "<string>",
"zen": "<string>",
"installation": {
"id": 123
},
"repository": {
"id": 123,
"full_name": "<string>"
},
"pull_request": {
"number": 123,
"merged": true,
"head": {
"sha": "<string>",
"ref": "<string>"
},
"merge_commit_sha": "<string>"
},
"sender": {}
}
'import requests
url = "https://evalgate.com/api/webhooks/github-app"
payload = {
"action": "<string>",
"zen": "<string>",
"installation": { "id": 123 },
"repository": {
"id": 123,
"full_name": "<string>"
},
"pull_request": {
"number": 123,
"merged": True,
"head": {
"sha": "<string>",
"ref": "<string>"
},
"merge_commit_sha": "<string>"
},
"sender": {}
}
headers = {
"X-GitHub-Event": "<x-github-event>",
"X-GitHub-Delivery": "<x-github-delivery>",
"X-Hub-Signature-256": "<x-hub-signature-256>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-GitHub-Event': '<x-github-event>',
'X-GitHub-Delivery': '<x-github-delivery>',
'X-Hub-Signature-256': '<x-hub-signature-256>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
action: '<string>',
zen: '<string>',
installation: {id: 123},
repository: {id: 123, full_name: '<string>'},
pull_request: {
number: 123,
merged: true,
head: {sha: '<string>', ref: '<string>'},
merge_commit_sha: '<string>'
},
sender: {}
})
};
fetch('https://evalgate.com/api/webhooks/github-app', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://evalgate.com/api/webhooks/github-app",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'action' => '<string>',
'zen' => '<string>',
'installation' => [
'id' => 123
],
'repository' => [
'id' => 123,
'full_name' => '<string>'
],
'pull_request' => [
'number' => 123,
'merged' => true,
'head' => [
'sha' => '<string>',
'ref' => '<string>'
],
'merge_commit_sha' => '<string>'
],
'sender' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-GitHub-Delivery: <x-github-delivery>",
"X-GitHub-Event: <x-github-event>",
"X-Hub-Signature-256: <x-hub-signature-256>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://evalgate.com/api/webhooks/github-app"
payload := strings.NewReader("{\n \"action\": \"<string>\",\n \"zen\": \"<string>\",\n \"installation\": {\n \"id\": 123\n },\n \"repository\": {\n \"id\": 123,\n \"full_name\": \"<string>\"\n },\n \"pull_request\": {\n \"number\": 123,\n \"merged\": true,\n \"head\": {\n \"sha\": \"<string>\",\n \"ref\": \"<string>\"\n },\n \"merge_commit_sha\": \"<string>\"\n },\n \"sender\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-GitHub-Event", "<x-github-event>")
req.Header.Add("X-GitHub-Delivery", "<x-github-delivery>")
req.Header.Add("X-Hub-Signature-256", "<x-hub-signature-256>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://evalgate.com/api/webhooks/github-app")
.header("X-GitHub-Event", "<x-github-event>")
.header("X-GitHub-Delivery", "<x-github-delivery>")
.header("X-Hub-Signature-256", "<x-hub-signature-256>")
.header("Content-Type", "application/json")
.body("{\n \"action\": \"<string>\",\n \"zen\": \"<string>\",\n \"installation\": {\n \"id\": 123\n },\n \"repository\": {\n \"id\": 123,\n \"full_name\": \"<string>\"\n },\n \"pull_request\": {\n \"number\": 123,\n \"merged\": true,\n \"head\": {\n \"sha\": \"<string>\",\n \"ref\": \"<string>\"\n },\n \"merge_commit_sha\": \"<string>\"\n },\n \"sender\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://evalgate.com/api/webhooks/github-app")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-GitHub-Event"] = '<x-github-event>'
request["X-GitHub-Delivery"] = '<x-github-delivery>'
request["X-Hub-Signature-256"] = '<x-hub-signature-256>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"action\": \"<string>\",\n \"zen\": \"<string>\",\n \"installation\": {\n \"id\": 123\n },\n \"repository\": {\n \"id\": 123,\n \"full_name\": \"<string>\"\n },\n \"pull_request\": {\n \"number\": 123,\n \"merged\": true,\n \"head\": {\n \"sha\": \"<string>\",\n \"ref\": \"<string>\"\n },\n \"merge_commit_sha\": \"<string>\"\n },\n \"sender\": {}\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"reason": "<string>",
"deliveryId": "<string>"
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Headers
GitHub App event name (for example ping, pull_request).
GitHub delivery id used for webhook deduplication.
GitHub HMAC SHA-256 signature over the raw request body.
Body
application/json
Raw signed GitHub App webhook delivery. EvalGate verifies X-Hub-Signature-256 over the exact request bytes before parsing this JSON contract.
⌘I
Create webhooks github app
curl --request POST \
--url https://evalgate.com/api/webhooks/github-app \
--header 'Content-Type: application/json' \
--header 'X-GitHub-Delivery: <x-github-delivery>' \
--header 'X-GitHub-Event: <x-github-event>' \
--header 'X-Hub-Signature-256: <x-hub-signature-256>' \
--data '
{
"action": "<string>",
"zen": "<string>",
"installation": {
"id": 123
},
"repository": {
"id": 123,
"full_name": "<string>"
},
"pull_request": {
"number": 123,
"merged": true,
"head": {
"sha": "<string>",
"ref": "<string>"
},
"merge_commit_sha": "<string>"
},
"sender": {}
}
'import requests
url = "https://evalgate.com/api/webhooks/github-app"
payload = {
"action": "<string>",
"zen": "<string>",
"installation": { "id": 123 },
"repository": {
"id": 123,
"full_name": "<string>"
},
"pull_request": {
"number": 123,
"merged": True,
"head": {
"sha": "<string>",
"ref": "<string>"
},
"merge_commit_sha": "<string>"
},
"sender": {}
}
headers = {
"X-GitHub-Event": "<x-github-event>",
"X-GitHub-Delivery": "<x-github-delivery>",
"X-Hub-Signature-256": "<x-hub-signature-256>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-GitHub-Event': '<x-github-event>',
'X-GitHub-Delivery': '<x-github-delivery>',
'X-Hub-Signature-256': '<x-hub-signature-256>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
action: '<string>',
zen: '<string>',
installation: {id: 123},
repository: {id: 123, full_name: '<string>'},
pull_request: {
number: 123,
merged: true,
head: {sha: '<string>', ref: '<string>'},
merge_commit_sha: '<string>'
},
sender: {}
})
};
fetch('https://evalgate.com/api/webhooks/github-app', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://evalgate.com/api/webhooks/github-app",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'action' => '<string>',
'zen' => '<string>',
'installation' => [
'id' => 123
],
'repository' => [
'id' => 123,
'full_name' => '<string>'
],
'pull_request' => [
'number' => 123,
'merged' => true,
'head' => [
'sha' => '<string>',
'ref' => '<string>'
],
'merge_commit_sha' => '<string>'
],
'sender' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-GitHub-Delivery: <x-github-delivery>",
"X-GitHub-Event: <x-github-event>",
"X-Hub-Signature-256: <x-hub-signature-256>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://evalgate.com/api/webhooks/github-app"
payload := strings.NewReader("{\n \"action\": \"<string>\",\n \"zen\": \"<string>\",\n \"installation\": {\n \"id\": 123\n },\n \"repository\": {\n \"id\": 123,\n \"full_name\": \"<string>\"\n },\n \"pull_request\": {\n \"number\": 123,\n \"merged\": true,\n \"head\": {\n \"sha\": \"<string>\",\n \"ref\": \"<string>\"\n },\n \"merge_commit_sha\": \"<string>\"\n },\n \"sender\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-GitHub-Event", "<x-github-event>")
req.Header.Add("X-GitHub-Delivery", "<x-github-delivery>")
req.Header.Add("X-Hub-Signature-256", "<x-hub-signature-256>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://evalgate.com/api/webhooks/github-app")
.header("X-GitHub-Event", "<x-github-event>")
.header("X-GitHub-Delivery", "<x-github-delivery>")
.header("X-Hub-Signature-256", "<x-hub-signature-256>")
.header("Content-Type", "application/json")
.body("{\n \"action\": \"<string>\",\n \"zen\": \"<string>\",\n \"installation\": {\n \"id\": 123\n },\n \"repository\": {\n \"id\": 123,\n \"full_name\": \"<string>\"\n },\n \"pull_request\": {\n \"number\": 123,\n \"merged\": true,\n \"head\": {\n \"sha\": \"<string>\",\n \"ref\": \"<string>\"\n },\n \"merge_commit_sha\": \"<string>\"\n },\n \"sender\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://evalgate.com/api/webhooks/github-app")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-GitHub-Event"] = '<x-github-event>'
request["X-GitHub-Delivery"] = '<x-github-delivery>'
request["X-Hub-Signature-256"] = '<x-hub-signature-256>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"action\": \"<string>\",\n \"zen\": \"<string>\",\n \"installation\": {\n \"id\": 123\n },\n \"repository\": {\n \"id\": 123,\n \"full_name\": \"<string>\"\n },\n \"pull_request\": {\n \"number\": 123,\n \"merged\": true,\n \"head\": {\n \"sha\": \"<string>\",\n \"ref\": \"<string>\"\n },\n \"merge_commit_sha\": \"<string>\"\n },\n \"sender\": {}\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"reason": "<string>",
"deliveryId": "<string>"
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}