71 lines
1.5 KiB
Bash
Executable File
71 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
REPO_NAME=${1:-overub}
|
|
REPO_DESC="OverUB - Advanced Modular Telegram Userbot by @overspend1"
|
|
|
|
if ! command -v tea &> /dev/null; then
|
|
echo "Tea CLI not found. Please install it first."
|
|
exit 1
|
|
fi
|
|
|
|
if ! tea login list &> /dev/null; then
|
|
echo "Not logged into Gitea. Run 'tea login add' first."
|
|
exit 1
|
|
fi
|
|
|
|
tea repos create \
|
|
--name "$REPO_NAME" \
|
|
--description "$REPO_DESC" \
|
|
--private false \
|
|
--init \
|
|
--gitignore Python 2>/dev/null || echo "Repository might already exist"
|
|
|
|
BRANCHES=("main" "beta" "dev" "lts")
|
|
for branch in "${BRANCHES[@]}"; do
|
|
git checkout -b "$branch" 2>/dev/null || git checkout "$branch"
|
|
git push -u origin "$branch" 2>/dev/null || echo "Branch $branch already exists"
|
|
done
|
|
|
|
tea repos protect-branch main \
|
|
--enable-push \
|
|
--enable-push-whitelist \
|
|
--require-signed-commits || echo "Main branch already protected"
|
|
|
|
tea repos protect-branch lts \
|
|
--enable-push \
|
|
--enable-push-whitelist \
|
|
--require-signed-commits || echo "LTS branch already protected"
|
|
|
|
mkdir -p .gitea/ISSUE_TEMPLATE
|
|
|
|
cat > .gitea/ISSUE_TEMPLATE/bug_report.md << 'TEMPLATE'
|
|
---
|
|
name: Bug Report
|
|
about: Report a bug
|
|
labels: bug
|
|
---
|
|
|
|
## Bug Description
|
|
|
|
## Steps to Reproduce
|
|
1.
|
|
2.
|
|
3.
|
|
|
|
## Expected Behavior
|
|
|
|
## Actual Behavior
|
|
|
|
## Version Information
|
|
- OverUB Version:
|
|
- Python Version:
|
|
- OS:
|
|
TEMPLATE
|
|
|
|
git add .gitea/ 2>/dev/null || true
|
|
git commit -m "Add issue templates" 2>/dev/null || true
|
|
git push 2>/dev/null || true
|
|
|
|
echo "Gitea setup complete."
|