create-pr
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLanguage Conventions
语言规范
Infer language style from the project:
- Analyze existing pull requests, commit messages, and documentation to detect the project's language variant (US English, UK English, etc.)
- Match the spelling conventions found in the project (e.g., "optimize" vs "optimise", "favor" vs "favour")
- Maintain consistency with the project's established language style throughout PR titles and descriptions
Create a pull request with the following workflow:
- Check current git status and branch
- Push the current branch to remote (with -u flag if needed)
- Analyse recent commits to generate PR title and description
- Create GitHub PR and auto-assign to current user:
- Use to self-assign the pull request
gh pr create --assignee @me - If assignment fails (user not a collaborator), GitHub CLI will create the PR without assignment
- This provides convenience for repository collaborators while remaining safe for contributors
- Use
- Optional: Additional assignees can be added using flag (comma-separated for multiple)
--assignee- Note: PR is already auto-assigned to the current user via in step 4
--assignee @me
- Note: PR is already auto-assigned to the current user via
CONCISE PR RULE: Keep everything brief and focused
Generate a title based on the commit history and user's request context.
For the PR title:
- Use natural, descriptive language (NOT conventional commits format like "feat:", "fix:", "chore:")
- Make it clear and specific to the changes
- Keep it concise but informative
For the PR description:
- Maximum 1-2 bullet points summarizing the key changes
- No verbose explanations - be direct and specific
- No test plan, acceptance criteria, or additional sections
- Focus only on what changed and why
从项目中推断语言风格:
- 分析现有拉取请求、提交信息和文档,以检测项目的语言变体(美式英语、英式英语等)
- 匹配项目中使用的拼写规范(例如:"optimize" 对应 "optimise","favor" 对应 "favour")
- 在PR标题和描述中始终保持与项目既定语言风格一致
按照以下工作流创建拉取请求:
- 检查当前git状态和分支
- 将当前分支推送到远程仓库(必要时使用-u参数)
- 分析近期提交记录以生成PR标题和描述
- 创建GitHub PR并自动分配给当前用户:
- 使用命令将PR分配给自己
gh pr create --assignee @me - 如果分配失败(用户不是协作者),GitHub CLI将在不分配的情况下创建PR
- 这为仓库协作者提供了便利,同时对贡献者也保持安全
- 使用
- 可选:可使用参数添加额外的被分配人(多个用逗号分隔)
--assignee- 注意:步骤4中已通过将PR自动分配给当前用户
--assignee @me
- 注意:步骤4中已通过
简洁PR规则:保持内容简短且聚焦
根据提交历史和用户请求上下文生成标题。
对于PR标题:
- 使用自然、描述性语言(不要使用“feat:”、“fix:”、“chore:”这类约定式提交格式)
- 清晰明确地说明变更内容
- 保持简洁但信息完整
对于PR描述:
- 最多1-2个要点总结关键变更
- 避免冗长解释——直接且具体
- 不要包含测试计划、验收标准或额外章节
- 仅聚焦于变更内容和原因