What are Webhooks?
Webhooks allow MokoGitea to notify external services when events happen in your repositories — like pushes, pull requests, or issue updates. This enables real-time integrations with tools your team already uses.
Creating a Webhook
- Navigate to your repository's Settings → Webhooks.
- Click Add Webhook and select the type:
- Gitea — Generic JSON payload.
- Slack — Formatted for Slack channels.
- Discord — Formatted for Discord channels.
- Microsoft Teams — Formatted for Teams connectors.
- Custom — Send to any URL with a custom payload.
- Enter the Target URL (the endpoint that will receive notifications).
- Optionally set a Secret for payload verification.
- Select which events should trigger the webhook.
- Click Add Webhook.
Available Event Triggers
- Push — When commits are pushed to a branch.
- Create / Delete — When branches or tags are created or deleted.
- Pull Request — When PRs are opened, closed, merged, or updated.
- Issues — When issues are created, edited, or closed.
- Issue Comment — When comments are added to issues or PRs.
- Release — When a new release is published.
Verifying Delivery
After creating a webhook, MokoGitea sends a test ping. Check delivery status under Settings → Webhooks — click on your webhook to see recent deliveries, response codes, and payloads.
Gitea API
For custom integrations beyond webhooks, MokoGitea provides a full REST API. Common use cases:
- Automate repository creation and management.
- Build custom dashboards or reporting tools.
- Integrate with CI/CD pipelines or project management tools.
API documentation is available at your-mokogitea-url/api/swagger. Authenticate using a personal access token.
Popular Integration Examples
- Slack notifications — Get notified in a channel when PRs are opened or code is pushed.
- CI/CD triggers — Trigger builds in Jenkins, Drone, or Gitea Actions on push events.
- Issue sync — Mirror issues to external project management tools via API.