# Gitea Setup Guide This project uses the `tea` CLI for repository management. ## Login ```bash tea login add tea login list tea login default ``` ## Create Repositories ```bash tea repos create --name overub --description "OverUB - Modular Telegram Userbot" tea repos create --name overub-modules --description "Official OverUB Modules" tea repos create --name overub-plugins --description "Official OverUB Plugins" ``` ## Branch Setup ```bash ./scripts/setup-branches.sh overub ``` ## Webhook Setup ```bash tea webhooks create \ --url https://your-bot-server.com/webhook/gitea \ --events push,release,create \ --secret your_webhook_secret ``` ## Releases ```bash ./scripts/create-release.sh v1.0.0 ``` ## Branch Protection & Channels ```bash tea repos protect-branch main --enable-push --require-signed-commits tea repos protect-branch beta --enable-push --require-signed-commits tea repos protect-branch dev --enable-push tea repos protect-branch lts --enable-push --require-signed-commits ``` ## Tokens & SSH Keys - Create a personal access token with `repo` and `read:user` scopes. - Add SSH keys in Gitea settings and set `updates.git.use_ssh` and `updates.git.ssh_key` in `config/config.yml`. ## Repository Layout ``` overspend1/ overub/ overub-modules/ overub-plugins/ ``` ## Release Workflow 1. Tag and push: `git tag -a v1.0.0 -m "Release v1.0.0" && git push origin v1.0.0` 2. Create release with tea: `tea releases create --tag v1.0.0 --title "OverUB v1.0.0"` ## Webhooks - Use `updates.gitea.webhook_secret` in `config/config.yml`. - Verify webhook signatures in your server endpoint. ## CI/CD (Gitea Actions) ``` .gitea/workflows/test.yml ``` ## Tea Automation Scripts - `scripts/setup-gitea.sh` - `scripts/setup-branches.sh` - `scripts/create-release.sh`