Webhook Setup
Auto-trigger code reviews ยท HMAC-SHA256 signature verification ยท Supports Push & PR/MR events
๐Ÿ™ GitHub
๐ŸฆŠ GitLab
๐Ÿชฃ Bitbucket
๐Ÿ”— Webhook Endpoint
https://api.codeguardian.ai/api/v1/webhook/github
๐Ÿ”’
Verification: X-Hub-Signature-256 โ€” HMAC-SHA256 signature
GitHub signs the request body with the Secret below; reviews trigger only after server verification
๐Ÿ”‘ Webhook Secret
whsec_6f3a9d2e1b4c7f8a0e5d3c2b1a9f8e7d6c5b4a3f2e1d0c
๐Ÿ“ก Listen Events
โœ“
push
โœ“
pull_request
pull_request_review
create
release
workflow_run
๐Ÿ“‹ Setup Steps
1
Go to GitHub Repository Settings
Settings โ†’ Webhooks โ†’ Add webhook
2
Enter Payload URL
Paste the endpoint URL above into the Payload URL field
3
Set Content type
Select application/json
4
Enter Secret
Paste the generated Secret into the Secret field for HMAC-SHA256 verification
5
Select Events and Save
Check push and pull_request events, click Add webhook
๐Ÿ”— Webhook Endpoint
https://api.codeguardian.ai/api/v1/webhook/gitlab
๐Ÿ”‘
Verification: X-Gitlab-Token โ€” static token match
Enter the Token below in GitLab Webhook config; server validates request header consistency
๐Ÿ”‘ GitLab Token
glhk_9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d
๐Ÿ“ก Listen Events
โœ“
push events
โœ“
merge_request events
tag push events
pipeline events
๐Ÿ”— Webhook Endpoint
https://api.codeguardian.ai/api/v1/webhook/bitbucket
๐Ÿ”’
Verification: X-Hub-Signature โ€” HMAC-SHA256 signature (same as GitHub)
Enter the Secret Key in Bitbucket Webhook config
๐Ÿ”‘ Secret Key
bbhk_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f
๐Ÿ“ก Listen Events
โœ“
repo:push
โœ“
pullrequest:created
pullrequest:updated
pullrequest:fulfilled
๐Ÿ“œ Recent Webhook Event Log
push โ†’ main 202 Review triggered
github.com/org/backend-api ยท sha:a3f8c2d ยท by zhangsan
14:32:10
pull_request opened โ†’ main 202 Review triggered
github.com/org/frontend-app ยท PR #142 ยท by lisi
13:05:44
push 401 Signature verification failed
X-Hub-Signature-256 mismatch, check Secret configuration
12:18:03