mirror of
https://gitea.com/gitea/gitea-mcp.git
synced 2026-08-27 18:47:44 +00:00
feat(pull): add get_comments method to pull_request_read
List regular PR discussion comments via the issue comments endpoint, since Gitea pull requests are issues internally. Reuses the issue package's slim comment shape with attachment inlining. Co-Authored-By: Codet <codet@commitgo.dev> (GPT-5-Codex)
This commit is contained in:
@@ -164,3 +164,17 @@ func slimReviewComments(comments []*gitea_sdk.PullReviewComment) []map[string]an
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
func slimComment(c *gitea_sdk.Comment) map[string]any {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return map[string]any{
|
||||
"id": c.ID,
|
||||
"body": c.Body,
|
||||
"user": slim.UserLogin(c.Poster),
|
||||
"html_url": c.HTMLURL,
|
||||
"created_at": c.Created,
|
||||
"updated_at": c.Updated,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user