docs: fix stale env vars, add missing tools, expand README

- TOOL.md: rename PI_WEBHOOK_*/PI_BOT_POLL_* → GITEA_* throughout
- TOOL.md: add gitea_edit_issue, gitea_repo_config, gitea_tracked_repos
- TOOL.md: split env vars into required/tools/webhook/openclaw sections
- SKILL.md: add gitea_edit_issue and management tools to quick reference
- SKILL.md: add close-issue step to triage workflow
- SKILL.md: add Configure Bot Behavior section
- README.md: add Runtime Detection table (pi-bot vs openclaw auto-detect)
- README.md: add @mention routing section
- README.md: add openclaw Docker install instructions
- README.md: fix auth note (GITEA_WEBHOOK_TOKEN not PI_WEBHOOK_TOKEN)
- README.md: split env table into required/core/webhook/openclaw sections
This commit is contained in:
2026-03-14 11:52:35 -07:00
parent 1412a0fbb9
commit aa39af1c66
3 changed files with 246 additions and 45 deletions

View File

@@ -1,6 +1,6 @@
---
name: gitea
description: Interact with Gitea repositories, issues, PRs, CI runs, and files via git.dominat.us. Use when working with Gitea repos, triaging issues, reviewing PRs, checking CI logs, creating branches, updating files, or managing webhooks.
description: Interact with Gitea repositories, issues, PRs, CI runs, and files via git.dominat.us. Use when working with Gitea repos, triaging issues, reviewing PRs, checking CI logs, creating branches, updating files, managing webhooks, or configuring bot response behavior.
---
# Gitea
@@ -16,6 +16,7 @@ Tools for interacting with a Gitea instance (git.dominat.us by default).
- Reading or updating files in a repo via the API
- Creating branches for feature work
- Setting up webhooks for event notifications
- Configuring which repos the bot monitors and how it responds
## Quick Reference
@@ -42,12 +43,20 @@ See [TOOL.md](TOOL.md) for full parameter details on every tool.
| `gitea_ensure_repo` | Get or create a repository |
| `gitea_create_issue` | Open a new issue |
| `gitea_create_issue_comment` | Comment on an issue or PR |
| `gitea_edit_issue` | Change title, body, or state of an issue |
| `gitea_create_branch` | Create a branch |
| `gitea_update_file` | Create or update a file |
| `gitea_update_file` | Create or update a file (handles new vs existing automatically) |
| `gitea_create_pr` | Open a pull request |
| `gitea_merge_pr` | Merge a pull request |
| `gitea_create_webhook` | Add a webhook to a repo |
### Management
| Tool | Purpose |
|------|---------|
| `gitea_repo_config` | Set per-repo response mode (`"all"` or `"mention"`) |
| `gitea_tracked_repos` | List all tracked repos with type and response mode |
## Common Workflows
### Triage an Issue
@@ -55,30 +64,38 @@ See [TOOL.md](TOOL.md) for full parameter details on every tool.
1. `gitea_list_issues` to see open issues
2. `gitea_get_issue` to read details and comments
3. `gitea_create_issue_comment` to respond
4. `gitea_edit_issue` with `state: "closed"` when resolved
### Fix an Issue via PR
1. `gitea_get_issue` to understand the problem
2. `gitea_create_branch` to create a feature branch
3. `gitea_get_file_content` to read the file that needs fixing
4. `gitea_update_file` to push the fix (on the feature branch)
3. `gitea_get_file_content` to read the file(s) that need fixing (saves the SHA)
4. `gitea_update_file` to push the fix on the feature branch (pass the SHA for existing files)
5. `gitea_create_pr` to open a PR referencing the issue
6. `gitea_create_issue_comment` to note the fix
6. `gitea_edit_issue` with `state: "closed"` to close the issue
### Check CI Status
1. `gitea_list_runs` to see recent workflow runs
2. `gitea_get_run_logs` to read logs for a failing run
## Configuration
### Configure Bot Behavior
All tools use these environment variables for defaults:
- `gitea_tracked_repos` — see what the bot is monitoring
- `gitea_repo_config repo="owner/name" respondTo="all"` — respond to all events on this repo
- `gitea_repo_config repo="owner/name" respondTo="mention"` — only respond when @mentioned
## Configuration
| Variable | Purpose | Default |
|----------|---------|---------|
| `GITEA_URL` | Gitea instance URL | `https://git.dominat.us` |
| `GITEA_TOKEN` | API token (required) | — |
| `GITEA_USER` | Bot's own username | — |
| `GITEA_OWNER` | Default repo owner | — |
| `GITEA_REPO` | Default repo name | — |
Most tools accept `owner` and `repo` parameters to override defaults per-call.
See [TOOL.md](TOOL.md) for the full environment variable reference including webhook server and openclaw hooks settings.