This plugin allows Redmine to receive and process webhooks from Forgejo and Gitea repositories. It automatically updates Redmine issues based on commit messages and pull requests.
- Receives webhooks from Forgejo/Gitea repositories
- Automatically references issues in commit messages (e.g.,
#123,refs #123) - Automatically closes issues with keywords:
fixes #123,closes #123,fixed #123 - Optional: Reopen issues with keyword:
reopen #123 - Secure webhook verification using secret tokens
- Adds journal entries (comments) to referenced issues with commit information
- Supports project-specific webhooks
- Clone this repository into your Redmine plugins directory:
cd /path/to/redmine/plugins
git clone https://github.com/vanzhiganov/redmine-forgejo-webhook.git redmine_forgejo_webhook- Restart your Redmine instance:
# For Passenger
touch /path/to/redmine/tmp/restart.txt
# For other servers, restart the service
systemctl restart redmine- The plugin should now appear in Administration → Plugins
- Go to Administration → Plugins
- Click Configure next to "Redmine Forgejo/Gitea Webhook"
- Configure the settings:
- Secret Token (optional but recommended): Enter a secret token to verify webhook requests
- Automatically close issues: Enable to close issues when commits contain keywords like "fixes #123"
- Automatically reopen issues: Enable to reopen closed issues when commits contain "reopen #123"
- Note the webhook URL displayed in the settings
- Go to your repository settings in Forgejo/Gitea
- Navigate to Settings → Webhooks
- Click Add Webhook → Gitea (or Forgejo)
- Configure the webhook:
- Target URL:
https://your-redmine-instance.com/forgejo/webhookorhttps://your-redmine-instance.com/forgejo/webhook/PROJECT_IDENTIFIER - HTTP Method: POST
- POST Content Type: application/json
- Secret: Enter the same secret token you configured in Redmine (if using)
- Trigger On: Select "Push events" (and optionally "Pull request events", "Issue events")
- Active: Check this box
- Target URL:
- Click Add Webhook
Simply mention issue numbers in your commit messages:
git commit -m "Add new feature, refs #123"This will add a comment to issue #123 with the commit information.
Use closing keywords in your commit messages:
git commit -m "Fix the bug, fixes #123"
git commit -m "Resolve issue, closes #456"
git commit -m "Fixed the problem, fixed #789"These commits will automatically close the referenced issues (if auto-close is enabled).
If enabled, you can reopen issues:
git commit -m "Revert changes, reopen #123"For referencing:
#123refs #123references #123
For closing:
fixes #123fixed #123fix #123closes #123closed #123close #123
For reopening:
reopen #123reopens #123
The plugin handles the following webhook events:
- Push events: Processes commits and updates referenced issues
- Pull request events: Processes PR title and description for issue references
- Issue events: Logged for future functionality
- The plugin supports webhook signature verification using HMAC-SHA256
- Always use HTTPS for webhook URLs in production
- Use a strong, random secret token
- Check Redmine logs:
log/production.log - Verify the webhook URL is correct and accessible
- Check that the secret token matches (if configured)
- Ensure the Redmine user has permission to update issues
- Test the webhook in Forgejo/Gitea settings (Recent Deliveries)
- Verify issue IDs exist in Redmine
- Check that commit messages use correct keywords
- Ensure auto-close/auto-reopen settings are enabled if using those features
- Check Redmine logs for errors
To contribute or modify this plugin:
# Clone the repository
git clone https://github.com/vanzhiganov/redmine-forgejo-webhook.git
# Make your changes
# Test in your Redmine instance
# Restart Redmine after changesThis plugin is released under the MIT License.
Created by vanzhiganov
For issues, questions, or contributions, please visit: https://github.com/vanzhiganov/redmine-forgejo-webhook