create-pull

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Create Pull Request

创建拉取请求

Use
tea pulls create
for pull request creation. Bundled actions are only for CLI gaps and are documented under
actions/pull-requests/README.md
.
When resolving
actions/...
paths, use the
actions/
directory bundled relative to this skill directory.
Pass explicit scope flags (
--login
,
--remote
, or
--repo
) to bundled actions when the user names a login, remote, backend, or repository. Otherwise, bundled actions use active-host-first discovery.
使用
tea pulls create
命令创建拉取请求。内置操作仅用于填补 CLI 的功能空白,相关说明位于
actions/pull-requests/README.md
文件中。
解析
actions/...
路径时,请使用相对于本技能目录打包的
actions/
目录。
当用户指定了登录名、远程仓库、后端或仓库名称时,请向内置操作传递明确的作用域标志(
--login
、
--remote
或
--repo
)。否则,内置操作将采用「优先使用当前活跃主机」的发现策略。

Create

创建

bash
tea pulls create           # interactive, current branch -> default branch
tea pulls create --title "Add auth" --description "Implements JWT" \
  --head "feature/auth" --base "main" \
  --labels "bugfix" --assignees "sh" --milestone "v1.0"
tea pulls create --head "contributor:feature-branch" --base "main"  # from fork
bash
tea pulls create           # interactive, current branch -> default branch
tea pulls create --title "Add auth" --description "Implements JWT" \
  --head "feature/auth" --base "main" \
  --labels "bugfix" --assignees "sh" --milestone "v1.0"
tea pulls create --head "contributor:feature-branch" --base "main"  # from fork

WIP PR Convention

WIP PR 约定

Use the normal tea CLI and prefix the title with
WIP:
when a Forgejo/Gitea workflow treats WIP titles as draft-like pull requests.
bash
tea pulls create --title "WIP: Feature" --head feature-branch
tea pulls create --title "WIP: Feature" --head feature-branch --base develop
当 Forgejo/Gitea 的工作流将带有 WIP 前缀的标题视为草稿类拉取请求时,可使用常规 tea CLI 并在标题前添加
WIP:
前缀。
bash
tea pulls create --title "WIP: Feature" --head feature-branch
tea pulls create --title "WIP: Feature" --head feature-branch --base develop

Quick Pattern

快速模式

bash
undefined
bash
undefined

PR from current branch

PR from current branch

git push -u origin HEAD tea pulls create --title "$(git log -1 --format=%s)" --head "$(git branch --show-current)"
undefined
git push -u origin HEAD tea pulls create --title "$(git log -1 --format=%s)" --head "$(git branch --show-current)"
undefined

Rediscover Created PR

查询已创建的PR

tea pulls create
output is human-oriented. When you need the created PR number or URL for automation, use the structured branch lookup action instead of parsing command output:
bash
actions/pull-requests/find-by-branch.py
actions/pull-requests/find-by-branch.py --head "$(git branch --show-current)"
actions/pull-requests/find-by-branch.py --head "contributor:feature-branch" --base main
The action emits one JSON object per matching pull request as JSONL, suitable for
jq
or direct agent parsing.
tea pulls create
的输出是面向人类阅读的。如果你需要获取已创建的PR编号或URL用于自动化场景,请使用结构化的分支查找操作,而非解析命令输出:
bash
actions/pull-requests/find-by-branch.py
actions/pull-requests/find-by-branch.py --head "$(git branch --show-current)"
actions/pull-requests/find-by-branch.py --head "contributor:feature-branch" --base main
该操作会以 JSONL 格式输出,每个匹配的拉取请求对应一个 JSON 对象,适用于
jq
处理或直接由 Agent 解析。