Use when implementing Gitea pull-review create/list/submit or inline comments (pending reviews, commit_id vs current head, submit vs issue comments). This forge is Gitea 1.27. Do not webfetch go-gitea/main or GitHub review docs.
Instal·la
npx skillscat add jumi-ai/jumi/gitea-pull-review Instal·la des del registre de SkillsCat.
gitea-pull-review
This instance runs Gitea 1.27 (/api/v1/version → 1.27.3). Pin to that. Do not webfetch raw.githubusercontent.com/go-gitea/gitea/main (pull_review.go, convert, routers) or GitHub's review API.
Load this skill via the skill tool.
Base: POST|GET /api/v1/repos/{owner}/{repo}/pulls/{index}/reviews
Create
POST .../pulls/{index}/reviews
Body (CreatePullReviewOptions):
{
"body": "summary",
"commit_id": "<current pull.head.sha>",
"event": "PENDING",
"comments": [
{ "path": "src/foo.ts", "body": "inline", "new_position": 12, "old_position": 0 }
]
}event: set explicitly.PENDINGkeeps a draft.COMMENTpublishes. Do not omit.- Inline comments go in
commentsat create time. 1.27 has noPOST .../reviews/{id}/commentsand noPOST .../pulls/{index}/commentsfor a new thread. - Create comment fields are
body,path,new_position(new-file line, or 0),old_position(old-file line, or 0). Not GitHubline/side/start_line/subject_type.
commit_id vs current head
- Set
commit_idto the PR's currenthead.sha. - Omit only if you mean “head at create time”; empty is filled with head. Do not pass a file blob SHA, base SHA, or an older review SHA.
- A SHA that is not the current head is not a
422; create succeeds withstale: false. - After HEAD moves, a pending review's
commit_idstays the old SHA andstaleis true. Submit (POST .../reviews/{id}) rewritescommit_idto current head.
List / get
GET .../pulls/{index}/reviews?limit=50&page=1— array ofPullReview. Page while length is exactly 50.GET .../pulls/{index}/reviews/{id}— one review.GET .../pulls/{index}/reviews/{id}/comments— that review's inline comments. Nested per review; there is noGET .../pulls/{index}/comments.- List includes the author's
PENDINGreviews. There is no nestedcommentsarray on the review object.
Submit pending
POST .../pulls/{index}/reviews/{id}
{ "body": "summary", "event": "COMMENT" }That publishes the pending review. Not GitHub .../reviews/{id}/events. Do not submit with event: PENDING.
Submit vs comments
| Intent | 1.27 |
|---|---|
| Conversation (not inline) | POST .../issues/{index}/comments { "body" } — not a review |
| Published review ± inlines | POST .../reviews with event: COMMENT and comments |
| Draft then publish | POST .../reviews event: PENDING + comments, then POST .../reviews/{id} event: COMMENT |
| Reply to an inline | POST .../pulls/{index}/comments/{id}/replies { "body" } |
Do not copy GitHub: create pending → POST review comments → POST events.
What 1.27 returns
PullReview: id, user, body, commit_id, state, html_url, pull_request_url, comments_count, official, stale, dismissed, submitted_at, updated_at, optional team.
state: PENDING | COMMENT | APPROVED | REQUEST_CHANGES | REQUEST_REVIEW. REST uses state, not status. No content / type on the REST object (webhooks may send type).
PullReviewComment: id, body, path, commit_id, original_commit_id, position (new line), original_position (old line), diff_hunk, pull_request_review_id, html_url, pull_request_url, user, created_at, updated_at, optional resolver. Read uses position / original_position, not the create names new_position / old_position.
Create/submit success is 200 + that object. Missing PR/review: 404. PENDING requires a non-empty body (even when comments is set). COMMENT with no body and no comments, or submit event: PENDING: 422.
Do not
- Webfetch
go-gitea/giteamain or GitHub pull-review docs to guess this API. - Add MCP.
- Treat
REQUEST_CHANGES/APPROVEDas in-scope for this skill (create/list/submit pending andCOMMENTonly).