---
name: gitea
description: "Interact with Gitea API using curl. This repository uses Gitea (NOT GitHub) at http://10.0.30.169:3000/api/v1. ALWAYS use HTTP (not HTTPS)."
metadata: {"nanobot":{"emoji":"🔧","requires":{"env":["NANOBOT_GITLE_TOKEN"]}}}
---

# Gitea Skill

**CRITICAL**: This repository uses Gitea at `http://10.0.30.169:3000/api/v1`, NOT GitHub.

## Important Rules

1. **ALWAYS use `http://` (NOT `https://`)** - Gitea runs on HTTP port 3000
2. **ALWAYS include Authorization header** with `$NANOBOT_GITLE_TOKEN`
3. **Repository**: `ilia/nanobot`
4. **API Base**: `http://10.0.30.169:3000/api/v1`

## Pull Requests

List all pull requests:
```bash
curl -H "Authorization: token $NANOBOT_GITLE_TOKEN" \
     "http://10.0.30.169:3000/api/v1/repos/ilia/nanobot/pulls"
```

List open pull requests:
```bash
curl -H "Authorization: token $NANOBOT_GITLE_TOKEN" \
     "http://10.0.30.169:3000/api/v1/repos/ilia/nanobot/pulls?state=open"
```

## Issues

List open issues:
```bash
curl -H "Authorization: token $NANOBOT_GITLE_TOKEN" \
     "http://10.0.30.169:3000/api/v1/repos/ilia/nanobot/issues?state=open"
```

## Helper Script

You can also use the helper script:
```bash
./workspace/gitea_api.sh prs
./workspace/gitea_api.sh issues open
```

## Common Mistakes to Avoid

❌ **WRONG**: `curl https://10.0.30.169:3000/api/...` (SSL error)
❌ **WRONG**: `curl http://gitea.example.com/api/...` (placeholder URL)
✅ **CORRECT**: `curl -H "Authorization: token $NANOBOT_GITLE_TOKEN" "http://10.0.30.169:3000/api/v1/repos/ilia/nanobot/pulls"`
