SuperAPI AI 工具集

pr-to-production

通用与其它

查看项目

更新于 10-15 17:29

技能介绍

用途:从 main 分支向 production 分支创建发布 PR,配合 semantic-release 完成自动化发布。当用户提到「リリースPR」「productionにPR」「リリース準備」或想触发发布时使用。

主要能力:先执行 git fetch origin production main --quiet 获取远端最新状态,强调必须使用远端引用(origin/production、origin/main)进行比较,因为本地分支可能已过期。随后并行收集上下文:用 git log origin/production..origin/main --oneline 查看待发布提交;用 git ls-remote --tags origin | grep -E 'refs/tags/v[0-9]+.[0-9]+.[0-9]+$' | sed 's/.*refs/tags///' | sort -V | tail -1 获取远端最新发布版本;用 git rev-list --count origin/production..origin/main 检查 main 是否领先 production。接着分析提交并按类型分类,计算预期版本号。最后用 gh pr create 基于 production 创建 PR,并使用 assets/pr-template.md 模板。

版本规则:feat: 触发 minor(1.0.0→1.1.0);fix:、perf:、revert: 触发 patch(1.0.0→1.0.1);BREAKING CHANGE 触发 major(1.0.0→2.0.0);docs:、chore:、ci: 不升版本。

PR 格式:标题和正文一律用英文,标题为 Release: vX.Y.Z,正文使用 assets/pr-template.md 模板。

限制:资料未提供该技能的安装方式、支持平台、收费情况及更多配置说明,暂未提供。