create-pr
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWhen creating a PR:
- Use
gh pr create - Use the target repo's dedicated PR template when one exists.
- Otherwise, use from this package as the fallback template.
workflow-create-pr/pull_request_template.md - Follow merge-queue conventions.
创建PR时:
- 使用
gh pr create - 如果目标仓库有专用的PR模板,请使用该模板。
- 否则,使用本包中的 作为备用模板。
workflow-create-pr/pull_request_template.md - 遵循合并队列规范。
Merge-queue mapping
合并队列映射规则
- PR title = commit title (Conventional Commits format).
- PR description = commit body (reusable as commit message content).
- PR title max: 72 characters.
- PR description line max: 72 characters, except long URLs, code blocks, or stack traces.
- PR标题 = 提交标题(Conventional Commits格式)。
- PR描述 = 提交正文(可复用为提交消息内容)。
- PR标题最大长度:72个字符。
- PR描述每行最大长度:72个字符,长URL、代码块或堆栈跟踪除外。
Description rules
描述规则
- The first line must be plain context text describing the change.
- After the context line, follow the selected template.
- If the target repo has a dedicated PR template, follow that template after the context line.
- Otherwise, append the sections from
after the context line.
workflow-create-pr/pull_request_template.md - Do not add extra headings beyond those required by the selected template.
- Fill and
CONFIG-CHANGE:sections when applicable.BREAKING-CHANGE: - Remove and/or
CONFIG-CHANGE:sections entirely if there is no config change or breaking change respectively.BREAKING-CHANGE: - Keep the description concise and commit-friendly.
- 第一行必须是描述变更的纯上下文文本。
- 上下文行之后,遵循所选模板的要求。
- 如果目标仓库有专用的PR模板,在上下文行之后遵循该模板的要求。
- 否则,在上下文行之后追加 中的章节。
workflow-create-pr/pull_request_template.md - 请勿添加所选模板要求之外的额外标题。
- 适用的情况下,请填写 和
CONFIG-CHANGE:章节。BREAKING-CHANGE: - 如果没有配置变更或破坏性变更,请分别完全删除 和/或
CONFIG-CHANGE:章节。BREAKING-CHANGE: - 保持描述简洁,符合提交友好的要求。
Steps
操作步骤
- Run the skill if it has not been run since the last code change. All matching checks must pass before proceeding.
verify - Review all commits on the branch
(and
git logagainst the base branch).git diff - Draft a PR title (Conventional Commits format, 72 chars max).
- Draft a PR description that starts with a plain context line.
- If the target repo has a dedicated PR template, follow that template
after the context line; otherwise append
after the context line.
workflow-create-pr/pull_request_template.md - Ask for confirmation from the user with all this information.
- Check if the branch needs to be pushed to remote.
- Create the PR.
- Return the PR URL.
- 如果上次代码变更后尚未运行**skill**,请先运行。所有相关检查必须全部通过后才能继续后续操作。
verify - 检查分支上的所有提交(执行以及与基准分支对比的
git log)。git diff - 起草PR标题(Conventional Commits格式,最多72个字符)。
- 起草PR描述,以纯上下文行开头。
- 如果目标仓库有专用的PR模板,在上下文行之后遵循该模板要求;否则在上下文行之后追加 内容。
workflow-create-pr/pull_request_template.md - 向用户展示所有上述信息,请求确认。
- 检查分支是否需要推送到远程仓库。
- 创建PR。
- 返回PR的URL。