Gitea and Forgejo
Send Gitea and Forgejo repository events, also on Codeberg, to Telegram.
One endpoint for Gitea, Forgejo and every service that runs them, like Codeberg. Thook tells them apart: the title of the message says Gitea or Forgejo.
Add the webhook
In your repository open Settings → Webhooks → Add webhook, choose Gitea (or Forgejo) and fill the form:
| Field | Value |
|---|---|
| Target URL | https://thook.altr.dev/hooks/gitea/{unique_path} |
| HTTP method | POST |
| POST content type | application/json |
| Secret | The secret key from the bot |
| Trigger on | Custom events, then pick the ones below |
Save, then use Test delivery and check the delivery list: a 202 means it works.
Supported events
- Push
- Workflow runs (when Actions are enabled)
- Pull requests, with approved, rejected and review comments
- Issues and issue comments (comments on issues and on pull requests)
- Releases
- Branch or tag creation and deletion
- Forks
- Wiki changes
- Repository created, deleted and renamed (set on an organization or on the whole instance, not on a repository)
You choose the events: Thook shows the ones the webhook sends. Changes of labels, assignees and milestones, and any other event, are accepted and ignored.
What you get
The title tells the event, then the details, who did it and a link to the event as the last line. The meaning of the icons is in the quick start.
📣 Push · Forgejo
📦 alice/app · main
📔 2 commits
• Fix the start message
• Add tests
👤 alice
View push
🟢 Workflow passed · Gitea
📦 alice/app · main
⚙️ Build · #12 · 🕒 1m 5s
👤 alice
View run
🟣 Pull request merged · Forgejo
📦 alice/app
📰 #7 Add rate limiting
🌿 feat/rate-limit → main
👤 bob
Open PR
A workflow run is one message that updates from started to running, and the result is a new message: see Workflows, pipelines and deploys.
Troubleshooting
401in the delivery list: the Secret is different from the one in the bot message.- Nothing arrives but the status is
202: the event is not in the list above, or it is one of the changes that Thook ignores.