938 B
938 B
Gitea Configuration
API Information
- Gitea API Base URL:
http://10.0.30.169:3000/api/v1 - Repository:
ilia/nanobot - Token Environment Variable:
NANOBOT_GITLE_TOKEN
How to Use
When making Gitea API calls, use:
# Get token from environment
TOKEN=$NANOBOT_GITLE_TOKEN
# List open issues
curl -H "Authorization: token $TOKEN" \
"http://10.0.30.169:3000/api/v1/repos/ilia/nanobot/issues?state=open"
# List pull requests
curl -H "Authorization: token $TOKEN" \
"http://10.0.30.169:3000/api/v1/repos/ilia/nanobot/pulls"
# Get repository info
curl -H "Authorization: token $TOKEN" \
"http://10.0.30.169:3000/api/v1/repos/ilia/nanobot"
Detecting Repository Info
You can detect the repository from git remote:
# Get repo path (owner/repo)
git remote get-url origin | sed 's/.*:\(.*\)\.git/\1/'
# Gitea host is: 10.0.30.169:3000
# API base: http://10.0.30.169:3000/api/v1