create-pr
Solid创建 Pull Request 到目标分支。 当变更已提交、需要发起 Pull Request 评审时使用。
AI & Automation 85 stars
5 forks Updated today MIT
Install
Quality Score: 82/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# 创建 Pull Request
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」。
创建 Pull Request,并在与任务关联时立即补齐核心元数据和 reviewer 摘要。
`platform-pr create` 返回唯一的 `result` / `warnings` 字段;成功结果为 `pr_created`、`pr_reused` 或 `no_op`,同步降级时为对应的 `_with_warnings` 结果(包括 `no_op_with_warnings`)。创建前必须证明任务分支已推送,远端 branch SHA 与本地预期 `HEAD` 一致;缺失、漂移、PR head SHA 不一致或 bind 前竞态都属于 hard failure,不得用 warning 继续绑定。
## 行为边界 / 关键规则
版本戳规则:创建或更新 `task.md` frontmatter 时,先读取 `.agents/rules/version-stamp.md`,并写入或刷新 `agent_infra_version`。
## 任务上下文解析
> 入口可省略 task ref;显式 task scope 仅接受 `--task <ref>` 或 `-t <ref>`,不再解释位置 task ref。保留其余业务操作数后调用 `agent-infra-internal task-context resolve {task-scope}`;`{task-scope}` 为空或 task flag 之一。只读取结构化结果的 `taskId`,后续把 `{task-id}` 绑定为完整 `TASK-YYYYMMDD-HHMMSS`。解析失败时透传非零退出码,不自行扫描任务。
## 步骤开始:started 标记
真实执行 `platform-pr create` 时由 typed core 在远端写入前幂等登记 `Create PR [started]`;dry-run 不登记。调用方不得重复手写该条目。
## 执行流程
### 前置门控:项目级 PR 流程检查
**门控读取(项目级 PR 流程策略)**:在执行编号步骤前,读取 `.agents/.airc.json` 的 `prFlow` 字段(三态:字段缺省 = 默认推荐 PR、允许跳过;`"required"` = 强制 PR;`"disabled"` = 强制无 PR)。
按读取结果分支:
- 缺省 / `"required"` → 继续到下方第 1 步
- `"disabled"` → 输出以下消息后**立即停止**,不要执行任何后续编号步骤、不要触发任何 PR 创建命令、不要修改 `task.md` 的 `pr_delivery_fact`、不要发布 PR 摘要评论:
使用 `agent-infra-internal agent-client next-steps --skill complete-task --task-ref {task-ref}` 生成本场景的 `{next-step-commands}`。
```
当前项目未启用 PR 流程(`.agents/.airc.json` 中 `prFlow: "disabled"`)。
无需创建 Pull Request,请直接运行:
{next-step-commands}
```
### 1. 解析命令参数
先解析 t...
Details
- Author
- fitlab-ai
- Repository
- fitlab-ai/agent-infra
- Created
- 6 months ago
- Last Updated
- today
- Language
- TypeScript
- License
- MIT
Integrates with
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Solid
watch-pr
监控 PR readiness,并在任一 check 失败或合并冲突时自愈。 当需要持续监控 PR 直到门禁通过且明确可合入时使用。
85 Updated today
fitlab-ai AI & Automation Listed
create-pr
Open or update a pull request and handle in-scope CI failures. Use when the user wants to prepare a PR. For matching managed tasks, finalize the task as ready to merge; stop only when the current head is CI-green, and never merge or invoke sync-main.
18 Updated 1 months ago
SrdjanCoric Code & Development Listed
pr
引導 pull request 建立、審查自動化與合併策略。 Use when: 建立 PR、自動化審查流程、設定合併政策。 Not for: 審查本身的內容實質——請用 /code-review;分支命名與合併策略——請用 /git-workflow-guide。 Keywords: pull request, PR, merge, review, GitHub, GitLab, 合併請求, 審查自動化, 合併策略.
75 Updated today
AsiaOstrich