feat: consolidated Gitea API client and pi extension
- Pure fetch-based API client (src/) with zero external dependencies - Pi extension adapter (pi-extension/) registering 17 tools - Standalone CLI (cli.ts) replacing gitea-scripts/gitea.js - Token auth everywhere (no HMAC secrets) - SKILL.md for agent auto-discovery - TOOL.md with full parameter reference Consolidates pi-bot/extensions/pi-gitea and clawbot/gitea-scripts into a single shared package.
This commit is contained in:
84
SKILL.md
Normal file
84
SKILL.md
Normal file
@@ -0,0 +1,84 @@
|
||||
---
|
||||
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.
|
||||
---
|
||||
|
||||
# Gitea
|
||||
|
||||
Tools for interacting with a Gitea instance (git.dominat.us by default).
|
||||
|
||||
## When to Use
|
||||
|
||||
- Listing, viewing, or searching repositories
|
||||
- Reading or triaging issues
|
||||
- Reviewing or creating pull requests
|
||||
- Checking CI workflow runs and logs
|
||||
- Reading or updating files in a repo via the API
|
||||
- Creating branches for feature work
|
||||
- Setting up webhooks for event notifications
|
||||
|
||||
## Quick Reference
|
||||
|
||||
See [TOOL.md](TOOL.md) for full parameter details on every tool.
|
||||
|
||||
### Read Operations
|
||||
|
||||
| Tool | Purpose |
|
||||
|------|---------|
|
||||
| `gitea_list_repos` | List repos (yours or another owner's) |
|
||||
| `gitea_list_issues` | List issues on a repo |
|
||||
| `gitea_get_issue` | Get issue details + comments |
|
||||
| `gitea_list_prs` | List pull requests |
|
||||
| `gitea_get_pr` | Get PR details + comments |
|
||||
| `gitea_list_runs` | List CI workflow runs |
|
||||
| `gitea_get_run_logs` | Get full CI logs for a run |
|
||||
| `gitea_get_file_content` | Read a file from a repo |
|
||||
|
||||
### Write Operations
|
||||
|
||||
| Tool | Purpose |
|
||||
|------|---------|
|
||||
| `gitea_create_repo` | Create a new repository |
|
||||
| `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_create_branch` | Create a branch |
|
||||
| `gitea_update_file` | Create or update a file |
|
||||
| `gitea_create_pr` | Open a pull request |
|
||||
| `gitea_merge_pr` | Merge a pull request |
|
||||
| `gitea_create_webhook` | Add a webhook to a repo |
|
||||
|
||||
## Common Workflows
|
||||
|
||||
### Triage an Issue
|
||||
|
||||
1. `gitea_list_issues` to see open issues
|
||||
2. `gitea_get_issue` to read details and comments
|
||||
3. `gitea_create_issue_comment` to respond
|
||||
|
||||
### 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)
|
||||
5. `gitea_create_pr` to open a PR referencing the issue
|
||||
6. `gitea_create_issue_comment` to note the fix
|
||||
|
||||
### 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
|
||||
|
||||
All tools use these environment variables for defaults:
|
||||
|
||||
| Variable | Purpose | Default |
|
||||
|----------|---------|---------|
|
||||
| `GITEA_URL` | Gitea instance URL | `https://git.dominat.us` |
|
||||
| `GITEA_TOKEN` | API token (required) | — |
|
||||
| `GITEA_OWNER` | Default repo owner | — |
|
||||
| `GITEA_REPO` | Default repo name | — |
|
||||
|
||||
Most tools accept `owner` and `repo` parameters to override defaults per-call.
|
||||
Reference in New Issue
Block a user