介绍
# Gitea Skill
使用 `tea` CLI 与 Gitea 服务器交互。在非 git 目录下时使用 `--repo owner/repo`,或使用 `--login instance.com` 来指定 Gitea 实例。
## 设置
添加一个登录信息以开始: ```bash tea login add ```
检查当前登录用户: ```bash tea whoami ```
## 仓库
列出你有权访问的仓库: ```bash tea repos list ```
创建新仓库: ```bash tea repos create --name my-repo --description "My project" --init ```
创建私有仓库: ```bash tea repos create --name my-repo --private --init ```
Fork 仓库: ```bash tea repos fork owner/repo ```
删除仓库: ```bash tea repos delete --name my-repo --owner myuser --force ```
## 合并请求
列出打开的合并请求: ```bash tea pulls --repo owner/repo ```
查看特定的合并请求: ```bash tea pr 55 --repo owner/repo ```
在本地检出合并请求: ```bash tea pr checkout 55 ```
创建新的合并请求: ```bash tea pr create --title "Feature title" --description "Description" ```
## 问题
列出打开的问题: ```bash tea issues --repo owner/repo ```
查看特定的问题: ```bash tea issue 189 --repo owner/repo ```
创建新问题: ```bash tea issue create --title "Bug title" --body "Description" ```
查看里程碑的问题: ```bash tea milestone issues 0.7.0 ```
## 评论
向问题或合并请求添加评论: ```bash tea comment 189 --body "Your comment here" ```
## 发布
列出发布: ```bash tea releases --repo owner/repo ```
创建新发布: ```bash tea release create --tag v1.0.0 --title "Release 1.0.0" ```
## 操作 (CI/CD)
列出仓库操作密钥: ```bash tea actions secrets list ```
创建新密钥: ```bash tea actions secrets create API_KEY ```
列出操作变量: ```bash tea actions variables list ```
设置操作变量: ```bash tea actions variables set API_URL https://api.example.com ```
## Webhooks
列出仓库 webhooks: ```bash tea webhooks list ```
列出组织 webhooks: ```bash tea webhooks list --org myorg ```
创建 webhook: ```bash tea webhooks create https://example.com/hook --events push,pull_request ```
## 其他实体
列出分支: ```bash tea branches --repo owner/repo ```
列出标签: ```bash tea labels --repo owner/repo ```
列出里程碑: ```bash tea milestones --repo owner/repo ```
列出组织: ```bash tea organizations ```
显示仓库详情: ```bash tea repo --repo owner/repo ```
## 辅助工具
在浏览器中打开内容: ```bash tea open 189 # open issue/PR 189 tea open milestones # open milestones page ```
克隆仓库: ```bash tea clone owner/repo ```
显示通知: ```bash tea notifications --mine ```
## 输出格式
使用 `--output` 或 `-o` 来控制输出格式: ```bash tea issues --output simple # simple text output tea issues --output csv # CSV format tea issues --output yaml # YAML format ```