SuperAPI AI 工具集

gitea

部署与运维

查看项目

更新于 10-16 03:42

技能介绍

用途:该技能面向自托管 Gitea 服务,借助 tea CLI(需 v0.15 及以上)通过 Bash 命令管理 Gitea 资源。

主要能力:覆盖仓库(列表、搜索、创建、编辑、派生、克隆、删除、迁移)、议题与评论、拉取请求(创建、评审、批准、驳回、合并、检出)、发布与附件、标签与里程碑、CI/CD Actions(运行查看、日志、密钥与变量、工作流)、组织、Wiki、分支保护、时间跟踪、通知、Webhook、SSH 密钥等,并可用 tea api 直接访问未封装接口。

用法要点:首次使用前运行 bash scripts/check-tea.sh,或手动执行 tea --version && tea logins ls 校验;未安装需自行安装(macOS 可用 brew install tea)。在 git 仓库内 tea 会从远端自动识别实例与仓库,也可用 --repo owner/repo、--login name、--remote name 覆盖。输出格式用 --output(json 便于脚本解析,table 便于阅读)。常见示例:tea issues ls、tea issues create --title ... --labels bug --assignees user1、tea pulls create --title ... --base main --head branch、tea pulls merge 15 --style squash、tea releases create --tag v1.0.0 --title ... --note-file CHANGELOG.md、tea actions runs logs 42 --follow、tea api --method PUT /repos/{owner}/{repo}/topics/ci。

适用场景:自托管的 Gitea 仓库日常协作、议题与 PR 流程、发布与 CI 操作、组织与权限维护。

限制与注意:删除类操作具破坏性,需先与用户确认(部分命令需 --confirm)。具体子命令的参数形态有差异,例如 pulls ls 无 --labels 标志,需改用 issues ls --kind pulls;repos delete 用 --owner 与 --name,不接受 --repo;fork 不使用位置参数;发布与里程碑按标签名或标题而非数字 ID;releases delete 必须带 --confirm;labels 更新/删除用 --id;迁移的 --service 取 git/gitea/gitlab/gogs,GitHub 对应使用 git。dispatch 时 --ref 与 --repo 都占用 -r,应使用长选项。其他配置细节可参考随附的 authentication.md、tea-commands.md、workflows.md;暂未提供官方定价与平台支持信息。