81 lines
2.8 KiB
Markdown
81 lines
2.8 KiB
Markdown
# Gitea DTO Reference
|
|
|
|
Raw Gitea API responses are large. When processing responses in this skill, extract **only** the fields listed below. Discard everything else before passing data to agents or storing in context.
|
|
|
|
## Issue (`get_issue_by_index`)
|
|
|
|
```
|
|
{
|
|
"number": int, // issue index
|
|
"title": string, // issue title
|
|
"body": string, // issue description (markdown)
|
|
"state": string, // "open" | "closed"
|
|
"labels": [{ "name": string }],
|
|
"user": { "login": string },
|
|
"created_at": string,
|
|
"html_url": string
|
|
}
|
|
```
|
|
|
|
**Discard**: `id`, `url`, `original_author`, `original_author_id`, `ref`, `milestone`, `assignees`, `is_locked`, `pull_request`, `repository`, full `user` object (keep only `login`), full `labels` objects (keep only `name`).
|
|
|
|
## Comment (`get_issue_comments_by_index`)
|
|
|
|
Response is an array. Per comment extract:
|
|
|
|
```
|
|
{
|
|
"id": int, // comment ID (needed for edit_issue_comment)
|
|
"body": string, // comment body (markdown)
|
|
"user": { "login": string },
|
|
"created_at": string
|
|
}
|
|
```
|
|
|
|
**Discard**: `html_url`, `pull_request_url`, `issue_url`, `original_author`, `original_author_id`, `assets`, `updated_at`, full `user` object (keep only `login`).
|
|
|
|
## Comment classification
|
|
|
|
After extracting comment fields, classify each comment:
|
|
|
|
- **Bot comment**: `body` starts with `<!-- mpns-feature-bot -->`
|
|
- **User comment**: everything else
|
|
|
|
Bot comments are further classified by phase marker:
|
|
- Contains `### Questions` → Q&A session comment
|
|
- Contains `<!-- status:ready -->` → ready-for-planning marker
|
|
- Contains `## Implementation Plan` → plan-published marker
|
|
|
|
## Wiki page (`get_wiki_page`)
|
|
|
|
```
|
|
{
|
|
"title": string,
|
|
"content": string, // base64-encoded page content
|
|
"html_url": string
|
|
}
|
|
```
|
|
|
|
**Discard**: `sub_url`, `commit_count`, `sidebar`, `footer`, `last_commit`.
|
|
|
|
## Tool parameter reference
|
|
|
|
### Read operations
|
|
|
|
| Tool | Required params |
|
|
|------|----------------|
|
|
| `get_issue_by_index` | `owner`, `repo`, `index` (int) |
|
|
| `get_issue_comments_by_index` | `owner`, `repo`, `index` (int) |
|
|
| `get_wiki_page` | `owner`, `repo`, `pageName` (string) |
|
|
| `list_wiki_pages` | `owner`, `repo` |
|
|
|
|
### Write operations
|
|
|
|
| Tool | Required params | Notes |
|
|
|------|----------------|-------|
|
|
| `create_issue_comment` | `owner`, `repo`, `index` (int), `body` (string) | Body is markdown |
|
|
| `edit_issue_comment` | `owner`, `repo`, `commentID` (int), `body` (string) | |
|
|
| `create_wiki_page` | `owner`, `repo`, `title` (string), `content_base64` (string) | Content must be base64-encoded |
|
|
| `update_wiki_page` | `owner`, `repo`, `pageName` (string), `content_base64` (string) | Optional: `title`, `message` |
|
|
| `edit_issue` | `owner`, `repo`, `index` (int) | Optional: `title`, `body`, `state`, `assignees`, `milestone` |
|