create-pr

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Pull Request

拉取请求

Context

上下文

Run in parallel:
  • git status
    (never -uall)
  • git diff HEAD
  • Branch tracking status
  • git diff [base-branch]...HEAD
    and
    git log
并行运行以下命令:
  • git status
    (永远不要使用-uall参数)
  • git diff HEAD
  • 分支追踪状态
  • git diff [base-branch]...HEAD
    git log

Template Locations

模板位置

  • .github/pull_request_template.md
  • .github/PULL_REQUEST_TEMPLATE.md
  • .github/PULL_REQUEST_TEMPLATE/
  • docs/pull_request_template.md
  • pull_request_template.md
  • .github/pull_request_template.md
  • .github/PULL_REQUEST_TEMPLATE.md
  • .github/PULL_REQUEST_TEMPLATE/
  • docs/pull_request_template.md
  • pull_request_template.md

Workflow

工作流程

  1. Search for PR template
  2. Read template if found
  3. Review ALL commits (not just latest)
  4. Draft title (<70 chars) and body:
    • Use template structure if available
    • Otherwise: Summary + Test plan
  5. In parallel:
    • Create branch if needed
    • Push with
      -u
      if needed
    • Create PR with
      gh pr create
      using HEREDOC
  1. 搜索PR模板
  2. 若找到则读取模板
  3. 审核所有提交记录(不只是最新的)
  4. 草拟标题(少于70字符)和正文:
    • 若有模板则使用模板结构
    • 若无模板:摘要 + 测试计划
  5. 并行执行:
    • 若需要则创建分支
    • 若需要则使用
      -u
      参数推送
    • 使用HEREDOC通过
      gh pr create
      命令创建PR

Rules

规则

  • Use PR template if available
  • Analyze ALL commits
  • Return PR URL
  • Use
    gh
    CLI
  • 若有PR模板则使用
  • 分析所有提交记录
  • 返回PR链接
  • 使用
    gh
    CLI工具