feat: periodical synchronization to handle repo renaming
This commit is contained in:
@@ -52,6 +52,7 @@ services:
|
||||
- GITEA_WEBHOOK_SECRET
|
||||
- TEMPLATE_FILE=/config/gitea-rewrites.yml.in
|
||||
- OUTPUT_FILE=/config/gitea-rewrites.yml
|
||||
- SYNC_INTERVAL_MINUTES=5 # optional, default = 5, 0 to disable
|
||||
volumes:
|
||||
- /etc/traefik/dynamic:/config
|
||||
networks:
|
||||
@@ -84,6 +85,10 @@ Lastly, for the triggers select "Custom Events", then "Repository".
|
||||
And you're done, just hit "Add Webhook" and the service will start working.
|
||||
The Gitea webhooks interface shows you the logs, so you can see here if it reached the service.
|
||||
|
||||
### Renamed repositories
|
||||
|
||||
Gitea has no webhook event for repository renames (the "Repository" event only covers creation and deletion, and none of the other events fire on rename). To catch them, we also resyncs every `SYNC_INTERVAL_MINUTES` minutes (default 5).
|
||||
|
||||
## Template Format
|
||||
|
||||
You can put anything in here, `{{REPOSITORIES}}` will be pipe-separated repos list (`repo-a|repo-b`) and `{{USERNAME}}` just contain `GITEA_USERNAME`.
|
||||
|
||||
Reference in New Issue
Block a user