Files
rui-docs/ai-skills/gitea-api.md
T
vifo 8896b9aa58 feat(ai-skills): 添加 AI 全局技能库
创建 ai-skills/ 目录,包含所有 AI 助手共享的技能规范:

- gitea-api.md: Gitea API 使用指南

- issue-workflow.md: 工单处理标准流程

- menu-config.md: 菜单配置规范

- commit-standards.md: 提交规范

- README.md: 使用说明
2026-06-04 10:04:07 +08:00

43 lines
944 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Gitea API 使用指南
## Token 位置
```
~/.config/gitea/token
```
## 获取 Issue
```bash
curl -s -H "Authorization: token $(cat ~/.config/gitea/token)" \
"https://git.dev.vifo.cc/api/v1/repos/{owner}/{repo}/issues/{id}"
```
## 回复 Issue 评论
```bash
curl -s -X POST \
-H "Authorization: token $(cat ~/.config/gitea/token)" \
-H "Content-Type: application/json" \
-d '{"body": "评论内容"}' \
"https://git.dev.vifo.cc/api/v1/repos/{owner}/{repo}/issues/{id}/comments"
```
**注意**: JSON 内容需要转义换行符
## 常用端点
| 操作 | 端点 |
|------|------|
| 获取 Issue | `GET /api/v1/repos/{owner}/{repo}/issues/{id}` |
| 创建评论 | `POST /api/v1/repos/{owner}/{repo}/issues/{id}/comments` |
| 获取仓库 | `GET /api/v1/repos/{owner}/{repo}` |
## Git 远程地址
```
gitea ssh://git@git.dev.vifo.cc:222/rui/{repo}.git
```
**推送命令**: `git push gitea main`(注意不是 origin