make-pr

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Make Pull Request

创建Pull Request

Flags

参数

Flag / ArgEffect
--target <branch>
Target branch. Default:
main
.
--ticket <id>
Prefix the title with
[<TICKET-ID>]
(e.g.
--ticket ABC-123
). Off.
--conventional
Conventional-commit title format. Off, plain English by default.
If
--ticket
is passed without an ID, stop: "
--ticket
requires a ticket ID (e.g.,
--ticket ABC-123
)."
参数 / 自变量作用
--target <branch>
目标分支。默认值:
main
--ticket <id>
在标题前添加
[<工单编号>]
前缀(例如
--ticket ABC-123
)。默认关闭。
--conventional
采用约定式提交格式的标题。默认关闭,默认使用简洁英文标题。
如果传入
--ticket
参数但未指定编号,将终止操作并提示:"
--ticket
需要工单编号(例如
--ticket ABC-123
)。"

Step 1: Gather context

步骤1:收集上下文信息

  1. Identify the current branch.
  2. git log <target>..HEAD --oneline
    , commits on this branch.
  3. git diff <target>...HEAD
    , the full diff.
With
--ticket
, use the explicit value; never search the branch name or commits for a ticket number.
  1. 识别当前分支。
  2. 执行
    git log <target>..HEAD --oneline
    ,获取该分支的提交记录。
  3. 执行
    git diff <target>...HEAD
    ,获取完整的差异内容。
如果使用
--ticket
参数,使用指定的工单编号;切勿从分支名称或提交记录中搜索工单编号。

Step 2: Generate the title

步骤2:生成标题

Base the title on the branch diff, not commit messages or session context.
  • Default: plain English. Capitalize the first word; rest lowercase except proper nouns and technical terms. No
    feat:
    /
    fix:
    /
    docs:
    prefix.
  • --conventional
    :
    conventional-commit format; follow
    skills/commit/REFERENCE.md
    .
  • --ticket <id>
    :
    prepend
    [<TICKET-ID>]
    (uppercase as provided); keep the summary portion ≤60 chars.
Examples:
  • [ABC-123] Add user authentication flow
    (ticket, default)
  • Add user authentication flow
    (default)
  • [ABC-123] feat: add user authentication flow
    (ticket,
    --conventional
    )
标题基于分支差异生成,而非提交信息或会话上下文。
  • 默认格式:简洁英文。首字母大写;其余字母小写,专有名词和技术术语除外。不添加
    feat:
    /
    fix:
    /
    docs:
    前缀。
  • --conventional
    参数
    :采用约定式提交格式;遵循
    skills/commit/REFERENCE.md
    规范。
  • --ticket <id>
    参数
    :在标题前添加
    [<工单编号>]
    (按输入的大写格式);摘要部分长度需≤60字符。
示例:
  • [ABC-123] Add user authentication flow
    (带工单编号,默认格式)
  • Add user authentication flow
    (默认格式)
  • [ABC-123] feat: add user authentication flow
    (带工单编号,
    --conventional
    格式)

Step 3: Generate the body

步骤3:生成正文

A concise, high-level summary of the branch changes relative to the target. Group related changes thematically, not commit-by-commit. Factual and brief, no filler. No Linear references unless
--ticket
was passed.
简洁、高层次的分支相对于目标分支的变更摘要。按主题分组相关变更,而非按提交逐个罗列。内容需真实简洁,无冗余信息。除非使用了
--ticket
参数,否则不要添加Linear相关引用。

Step 4: Open the PR

步骤4:创建PR

Use
gh pr create
(or equivalent) with the generated title and body, targeting
--target
.
使用
gh pr create
(或等效工具),传入生成的标题和正文,目标分支为
--target
指定的分支。

Step 5: Report

步骤5:反馈结果

Report the PR URL.
反馈PR的URL。

Constraints

约束条件

  • Never commit, build, run, or push.
  • Never auto-detect Linear issues from branch names or commits, use the explicit
    --ticket
    value only.
  • 切勿执行提交、构建、运行或推送操作。
  • 切勿从分支名称或提交记录中自动检测Linear问题,仅使用
    --ticket
    参数指定的工单编号。