gitea-webhooks
Skill4 starsChanged 5 months agoMITView on GitHub
Use when managing Gitea webhooks — creating webhooks via API, understanding event types, system vs repo vs org webhooks, payload verification with HMAC-SHA256, and supported webhook formats.
- Sends data out
- Commits and pushes
In this repository74 other files it gives its agents.
- AGENTS.mdAGENTS.md
- atlasSkill
- cert-managerSkill
- cilium-gatewaySkill
- cilium-networkSkill
- cnpgSkill
- dragonflySkill
- external-dnsSkill
- external-secretsSkill
- flaggerSkill
- fluxSkill
- gitea-apiSkill
- gitea-registrySkill
- gitea-runnerSkill
- giteaSkill
- gitea-teaSkill
- harbor-apiSkill
- harbor-helmSkill
- harborSkill
- harbor-terraformSkill
- helm-chartSkill
- helm-opsSkill
- helmSkill
- higress-helmSkill
- higress-operatorSkill
- higressSkill
- kserve-helmSkill
- kserve-operatorSkill
- kserveSkill
- kubeflow-pipelinesSkill
- kubeflowSkill
- kubeflow-trainerSkill
- kubeflow-training-operatorSkill
- mariadb-helmSkill
- mariadb-operatorSkill
- mariadbSkill
- netbird-cliSkill
- netbird-operatorSkill
- netbird-serverSkill
- netbirdSkill
- netbird-terraformSkill
- nextcloud-apiSkill
- nextcloud-helmSkill
- nextcloudSkill
- nvidia-device-pluginSkill
- rook-ceph-operatorSkill
- rook-cephSkill
- rook-ceph-toolboxSkill
- sealed-secretsSkill
- stakater-reloaderSkill
- tailscaleSkill
- tailscale-talosSkill
- talosconfigSkill
- talosctlSkill
- talosSkill
- talos-terraformSkill
- tekton-operatorSkill
- tekton-pacSkill
- tekton-pipelinesSkill
- tektonSkill
- The first 60 shown.
The file
Files
Gitea Webhooks (v1.26)
Events
| Event | Trigger |
push | Git push |
create / delete | Branch/tag created or deleted |
fork | Repo forked |
issues | Issue opened/closed/reopened/edited/deleted |
issue_assign | Issue assigned/unassigned |
issue_label | Issue labels updated |
issue_comment | Comment on issue |
pull_request | PR opened/closed/reopened/edited/synced |
pull_request_review_approved | PR approved |
pull_request_review_rejected | PR rejected |
pull_request_review_comment | PR review comment |
pull_request_review_request | Review requested |
wiki | Wiki edited |
repository | Repo created/deleted |
release | Release published/updated/deleted |
package | Package published |
status | Commit status updated |
workflow_run | Actions workflow run completed |
workflow_job | Actions workflow job ready (autoscaling trigger) |
API
# Create repo webhook
curl -X POST https://git.example.com/api/v1/repos/{owner}/{repo}/hooks \
-H "Authorization: token <token>" \
-H "Content-Type: application/json" \
-d '{
"type": "gitea",
"config": {
"url": "https://example.com/webhook",
"content_type": "json",
"secret": "my-secret"
},
"events": ["push", "pull_request"],
"active": true
}'
# List webhooks
curl https://git.example.com/api/v1/repos/{owner}/{repo}/hooks \
-H "Authorization: token <token>"
# Delete webhook
curl -X DELETE https://git.example.com/api/v1/repos/{owner}/{repo}/hooks/{id} \
-H "Authorization: token <token>"System vs Repo Webhooks
| Type | Scope | API Endpoint |
| Repository | Single repo | POST /api/v1/repos/{owner}/{repo}/hooks |
| Organization | All repos in org | POST /api/v1/orgs/{org}/hooks |
| System | All repos instance-wide | POST /api/v1/admin/hooks (config.is_system_webhook: true) |
| Default | Template for new repos | POST /api/v1/admin/hooks (config.is_system_webhook: false) |
Payload Verification
Gitea signs the raw request body with HMAC-SHA256 using the configured secret.
Header: X-Gitea-Signature
Verify server-side:
import hmac, hashlib
signature = request.headers.get("X-Gitea-Signature")
expected = hmac.new(secret.encode(), request.body, hashlib.sha256).hexdigest()
if not hmac.compare_digest(signature, expected):
abort(401)Webhook Types (format)
gitea (generic JSON), gogs, slack, discord, dingtalk, telegram, msteams, feishu, wechatwork, packagist.
Common Mistakes
- HMAC algorithm — Gitea uses SHA256, not SHA1. Check
X-Gitea-Signatureheader. - System webhook flag — Must set
config.is_system_webhooktotruefor instance-wide webhooks. Defaults to false (template webhook). - Event names — Use snake_case in API:
pull_request,issue_comment. Verify against docs. - workflow_job for autoscaling — Use
workflow_jobevent (notworkflow_run) to trigger ephemeral runner spin-up.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

