SuperAPI AI 工具集

branch-pr

部署与运维

查看项目

更新于 10-16 08:47

技能介绍

用途:在创建拉取请求(PR)、准备提交分支或协助贡献者开 PR 时启用,落地 issue-first 强制流程。

主要能力与规则:每个 PR 必须关联一个已批准的 issue,无例外;必须恰好有一个 type:* 标签;合并前自动化检查必须通过;无 issue 关联的空 PR 会被 GitHub Actions 阻止。

工作流:1) 确认 issue 带 status:approved 标签;2) 按 type/description 创建分支;3) 用 conventional commits 实现变更;4) 对修改的脚本运行 shellcheck;5) 用模板开 PR;6) 添加恰好一个 type:* 标签;7) 等待自动化检查通过。

分支命名须匹配正则:^(feat|fix|chore|docs|style|refactor|perf|test|build|ci|revert)/[a-z0-9.-]+$,描述小写、无空格、仅 a-z0-9.-。

PR 正文必含:关联 issue(Closes/Fixes/Resolves #N,大小写不敏感,且 issue 需 status:approved)、PR 类型(勾选一项并加对应标签:Bug fix→type:bug,New feature→type:feature,Documentation only→type:docs,Code refactoring→type:refactor,Maintenance/tooling→type:chore,Breaking change→type:breaking-change)、1-3 条摘要、变更表格、测试计划、贡献者清单。

提交信息须匹配正则:^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(([a-z0-9._-]+))?!?: .+。提交类型映射到 PR 标签,如 feat→type:feature、fix→type:bug、docs→type:docs、refactor→type:refactor、chore/style/test/build/ci→type:chore、perf→type:feature、revert→type:bug、feat!/fix!→type:breaking-change。

自动化检查包括:Check Issue Reference、Check Issue Has status:approved、Check PR Has type:* Label 以及 Shellcheck。

常用命令:git checkout -b feat/my-feature main;shellcheck scripts/*.sh;git push -u origin feat/my-feature;gh pr create --title "feat(scope): description" --body "Closes #N";gh pr edit <pr-number> --add-label "type:feature"。

限制:该技能针对 Agent Teams Lite 仓库的 GitHub 工作流,要求仓库已配置对应模板与 Actions;其他平台或未启用该体系的仓库不适用。定价、安装方式等资料暂未提供。