I need setup a default config for all repos created in gitea (no matter if ther was created by web or by api). This default config is this:
- Init the repo with some predefined content
- Create two branch: develop and production
- Restrict permissions for the production branch to some groups
I haven't found any way to setup it in gitea config.
It seems that the single way to do this is with the api https://docs.gitea.io/en-us/api-usage/ doing some like this:
- Create a token in Settings -> Applications for Admin user
- Create a web server with a script, using token created in step 1, that config the repo and create branches using gitea api.
- Go to Site Administrator -> System Webhooks -> Add Webhook -> Gitea -> Trigger On: Custom events... -> Repository -> Repository created or deleted, and defined Target URL with the url of web server created in step two
is It right?
Isn't there a way to do that without create a web server to received the Webhooks?
Thanks