1

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:

  1. Init the repo with some predefined content
  2. Create two branch: develop and production
  3. 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:

  1. Create a token in Settings -> Applications for Admin user
  2. Create a web server with a script, using token created in step 1, that config the repo and create branches using gitea api.
  3. 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

santos82h
  • 452
  • 5
  • 15

0 Answers0