GitCode API 文档已提供 Discussions 页面相关 API,但 gitcode-cli 当前尚未适配。该 Issue 用于跟踪 CLI 对此接口的需求、设计与实现。
GET
/api/v5/orgs/{org}/discuss/{number}/comment/{comment_id}/reply
get_api_v5_orgs_{org}_discuss_{number}_comment_{comment_id}_reply
Organizations
Repositories
false
org
number
comment_id
access_token
page
per_page
无。
application/json
{ "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "created_at": { "type": "string" }, "author": { "type": "object", "properties": { "avatar_url": { "type": "string" }, "id": { "type": "string" }, "object_id": { "type": "string" }, "login": { "type": "string" }, "name": { "type": "string" } }, "required": [ "avatar_url", "id", "object_id", "login", "name" ] }, "content": { "type": "string" }, "md_content": { "type": "string" }, "is_hide": { "type": "integer" }, "reply_total": { "type": "integer" }, "like_total": { "type": "integer" }, "is_like": { "type": "boolean" }, "is_deleted": { "type": "integer" }, "is_remark": { "type": "integer" } }, "required": [ "id", "created_at", "author", "content", "md_content", "is_hide", "reply_total", "like_total", "is_like", "is_deleted", "is_remark" ] } }
{ "deprecated": false, "description": "", "operationId": "get_api_v5_orgs_{org}_discuss_{number}_comment_{comment_id}_reply", "tags": [ "Organizations", "Repositories" ], "parameters": [ { "name": "org", "in": "path", "description": "组织path", "required": true, "schema": { "type": "string" } }, { "name": "number", "in": "path", "description": "讨论的编号", "required": true, "schema": { "type": "string" } }, { "name": "comment_id", "in": "path", "description": "评论id", "required": true, "schema": { "type": "string" } }, { "name": "access_token", "in": "query", "description": "用户授权码", "required": false, "example": "", "schema": { "type": "string" } }, { "name": "page", "in": "query", "description": "当前的页码", "required": false, "schema": { "type": "string" } }, { "name": "per_page", "in": "query", "description": "每页的数量,最大为 100,默认 20", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "成功响应", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "created_at": { "type": "string" }, "author": { "type": "object", "properties": { "avatar_url": { "type": "string" }, "id": { "type": "string" }, "object_id": { "type": "string" }, "login": { "type": "string" }, "name": { "type": "string" } }, "required": [ "avatar_url", "id", "object_id", "login", "name" ] }, "content": { "type": "string" }, "md_content": { "type": "string" }, "is_hide": { "type": "integer" }, "reply_total": { "type": "integer" }, "like_total": { "type": "integer" }, "is_like": { "type": "boolean" }, "is_deleted": { "type": "integer" }, "is_remark": { "type": "integer" } }, "required": [ "id", "created_at", "author", "content", "md_content", "is_hide", "reply_total", "like_total", "is_like", "is_deleted", "is_remark" ] } } } }, "headers": {} } }, "security": [], "method": "get", "path": "/api/v5/orgs/{org}/discuss/{number}/comment/{comment_id}/reply", "servers": [ { "url": "https://api.gitcode.com", "description": "正式环境" } ], "securitySchemes": {}, "info": { "title": "GicodeOpenAPI", "description": "", "version": "1.0.0" }, "postman": { "name": "获取组织讨论评论回复列表", "description": { "content": "", "type": "text/plain" }, "url": { "path": [ "api", "v5", "orgs", ":org", "discuss", ":number", "comment", ":comment_id", "reply" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": false, "description": { "content": "用户授权码", "type": "text/plain" }, "key": "access_token", "value": "" }, { "disabled": false, "description": { "content": "当前的页码", "type": "text/plain" }, "key": "page", "value": "" }, { "disabled": false, "description": { "content": "每页的数量,最大为 100,默认 20", "type": "text/plain" }, "key": "per_page", "value": "" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) 组织path", "type": "text/plain" }, "type": "any", "value": "", "key": "org" }, { "disabled": false, "description": { "content": "(Required) 讨论的编号", "type": "text/plain" }, "type": "any", "value": "", "key": "number" }, { "disabled": false, "description": { "content": "(Required) 评论id", "type": "text/plain" }, "type": "any", "value": "", "key": "comment_id" } ] }, "header": [ { "key": "Accept", "value": "application/json" } ], "method": "GET" } }
infra-test/*
验证记录见 #465 评论(gc-api-doc 确认 4 端点 + 评论/回复 schema 一致)。同片交付。
背景
GitCode API 文档已提供 Discussions 页面相关 API,但 gitcode-cli 当前尚未适配。该 Issue 用于跟踪 CLI 对此接口的需求、设计与实现。
API 摘要
GET/api/v5/orgs/{org}/discuss/{number}/comment/{comment_id}/replyget_api_v5_orgs_{org}_discuss_{number}_comment_{comment_id}_replyOrganizations,RepositoriesfalseRequest Parameters
orgnumbercomment_idaccess_tokenpageper_pageRequest Body
无。
Responses
200
application/jsonapplication/json schema
{ "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "created_at": { "type": "string" }, "author": { "type": "object", "properties": { "avatar_url": { "type": "string" }, "id": { "type": "string" }, "object_id": { "type": "string" }, "login": { "type": "string" }, "name": { "type": "string" } }, "required": [ "avatar_url", "id", "object_id", "login", "name" ] }, "content": { "type": "string" }, "md_content": { "type": "string" }, "is_hide": { "type": "integer" }, "reply_total": { "type": "integer" }, "like_total": { "type": "integer" }, "is_like": { "type": "boolean" }, "is_deleted": { "type": "integer" }, "is_remark": { "type": "integer" } }, "required": [ "id", "created_at", "author", "content", "md_content", "is_hide", "reply_total", "like_total", "is_like", "is_deleted", "is_remark" ] } }原始 OpenAPI Operation
{ "deprecated": false, "description": "", "operationId": "get_api_v5_orgs_{org}_discuss_{number}_comment_{comment_id}_reply", "tags": [ "Organizations", "Repositories" ], "parameters": [ { "name": "org", "in": "path", "description": "组织path", "required": true, "schema": { "type": "string" } }, { "name": "number", "in": "path", "description": "讨论的编号", "required": true, "schema": { "type": "string" } }, { "name": "comment_id", "in": "path", "description": "评论id", "required": true, "schema": { "type": "string" } }, { "name": "access_token", "in": "query", "description": "用户授权码", "required": false, "example": "", "schema": { "type": "string" } }, { "name": "page", "in": "query", "description": "当前的页码", "required": false, "schema": { "type": "string" } }, { "name": "per_page", "in": "query", "description": "每页的数量,最大为 100,默认 20", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "成功响应", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "created_at": { "type": "string" }, "author": { "type": "object", "properties": { "avatar_url": { "type": "string" }, "id": { "type": "string" }, "object_id": { "type": "string" }, "login": { "type": "string" }, "name": { "type": "string" } }, "required": [ "avatar_url", "id", "object_id", "login", "name" ] }, "content": { "type": "string" }, "md_content": { "type": "string" }, "is_hide": { "type": "integer" }, "reply_total": { "type": "integer" }, "like_total": { "type": "integer" }, "is_like": { "type": "boolean" }, "is_deleted": { "type": "integer" }, "is_remark": { "type": "integer" } }, "required": [ "id", "created_at", "author", "content", "md_content", "is_hide", "reply_total", "like_total", "is_like", "is_deleted", "is_remark" ] } } } }, "headers": {} } }, "security": [], "method": "get", "path": "/api/v5/orgs/{org}/discuss/{number}/comment/{comment_id}/reply", "servers": [ { "url": "https://api.gitcode.com", "description": "正式环境" } ], "securitySchemes": {}, "info": { "title": "GicodeOpenAPI", "description": "", "version": "1.0.0" }, "postman": { "name": "获取组织讨论评论回复列表", "description": { "content": "", "type": "text/plain" }, "url": { "path": [ "api", "v5", "orgs", ":org", "discuss", ":number", "comment", ":comment_id", "reply" ], "host": [ "{{baseUrl}}" ], "query": [ { "disabled": false, "description": { "content": "用户授权码", "type": "text/plain" }, "key": "access_token", "value": "" }, { "disabled": false, "description": { "content": "当前的页码", "type": "text/plain" }, "key": "page", "value": "" }, { "disabled": false, "description": { "content": "每页的数量,最大为 100,默认 20", "type": "text/plain" }, "key": "per_page", "value": "" } ], "variable": [ { "disabled": false, "description": { "content": "(Required) 组织path", "type": "text/plain" }, "type": "any", "value": "", "key": "org" }, { "disabled": false, "description": { "content": "(Required) 讨论的编号", "type": "text/plain" }, "type": "any", "value": "", "key": "number" }, { "disabled": false, "description": { "content": "(Required) 评论id", "type": "text/plain" }, "type": "any", "value": "", "key": "comment_id" } ] }, "header": [ { "key": "Accept", "value": "application/json" } ], "method": "GET" } }初步验收建议
infra-test/*仓库。access_token仅作为 API 参数记录,CLI 优先复用现有认证机制。