GitLab merge request webhook receiver
curl --request POST \
--url https://app.trustivan.com/api/v1/gitlab/webhook/{id}import requests
url = "https://app.trustivan.com/api/v1/gitlab/webhook/{id}"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://app.trustivan.com/api/v1/gitlab/webhook/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/gitlab/webhook/{id}"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}GitLab merge request webhook receiver
Authenticated by the secret token GitLab sends in X-Gitlab-Token,
compared against the SHA-256 stored when the webhook was created. A
Merge Request Hook (open, reopen, update; opened, not a draft, not
from a fork) on a repository asset with PR checks on is recorded as a
pending check; the result is posted as a commit status and, when the
change introduces findings or fails, a merge request note.
POST
/
gitlab
/
webhook
/
{id}
GitLab merge request webhook receiver
curl --request POST \
--url https://app.trustivan.com/api/v1/gitlab/webhook/{id}import requests
url = "https://app.trustivan.com/api/v1/gitlab/webhook/{id}"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://app.trustivan.com/api/v1/gitlab/webhook/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/gitlab/webhook/{id}"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}