create-pr
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCreate Pull Request
创建GitHub拉取请求
Creates GitHub PRs with titles that pass n8n's CI validation.
check-pr-title创建符合n8n的 CI验证要求的GitHub PR。
check-pr-titlePR Title Format
PR标题格式
<type>(<scope>): <summary><type>(<scope>): <summary>Types (required)
类型(必填)
| Type | Description | Changelog |
|---|---|---|
| New feature | Yes |
| Bug fix | Yes |
| Performance improvement | Yes |
| Adding/correcting tests | No |
| Documentation only | No |
| Code change (no bug fix or feature) | No |
| Build system or dependencies | No |
| CI configuration | No |
| Routine tasks, maintenance | No |
| 类型 | 描述 | 更新日志 |
|---|---|---|
| 新功能 | 是 |
| Bug修复 | 是 |
| 性能优化 | 是 |
| 添加/修正测试用例 | 否 |
| 仅文档变更 | 否 |
| 代码重构(无Bug修复或新功能) | 否 |
| 构建系统或依赖项变更 | 否 |
| CI配置变更 | 否 |
| 日常任务、维护工作 | 否 |
Scopes (optional but recommended)
范围(可选但推荐)
- - Public API changes
API - - Benchmark CLI changes
benchmark - - Core/backend/private API
core - - Editor UI changes
editor - - Specific node (e.g.,
* Node,Slack Node)GitHub Node
- - 公开API变更
API - - Benchmark CLI变更
benchmark - - 核心/后端/私有API变更
core - - 编辑器UI变更
editor - - 特定节点(例如
* Node、Slack Node)GitHub Node
Summary Rules
摘要规则
- Use imperative present tense: "Add" not "Added"
- Capitalize first letter
- No period at the end
- No ticket IDs (e.g., N8N-1234)
- Add suffix to exclude from changelog
(no-changelog)
- 使用祈使句现在时态:用“Add”而非“Added”
- 首字母大写
- 结尾无句号
- 不包含工单ID(例如N8N-1234)
- 若需排除在更新日志外,添加后缀
(no-changelog)
Steps
步骤
-
Check current state:bash
git status git diff --stat git log origin/master..HEAD --oneline -
Analyze changes to determine:
- Type: What kind of change is this?
- Scope: Which package/area is affected?
- Summary: What does the change do?
-
Push branch if needed:bash
git push -u origin HEAD -
Create PR using gh CLI with the template from:
.github/pull_request_template.mdbashgh pr create --draft --title "<type>(<scope>): <summary>" --body "$(cat <<'EOF' ## Summary <Describe what the PR does and how to test. Photos and videos are recommended.> ## Related Linear tickets, Github issues, and Community forum posts <!-- Link to Linear ticket: https://linear.app/n8n/issue/[TICKET-ID] --> <!-- Use "closes #<issue-number>", "fixes #<issue-number>", or "resolves #<issue-number>" to automatically close issues --> ## Review / Merge checklist - [ ] PR title and summary are descriptive. ([conventions](../blob/master/.github/pull_request_title_conventions.md)) - [ ] [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up ticket created. - [ ] Tests included. - [ ] PR Labeled with `release/backport` (if the PR is an urgent fix that needs to be backported) EOF )"
-
检查当前状态:bash
git status git diff --stat git log origin/master..HEAD --oneline -
分析变更以确定:
- 类型:此次变更属于哪种类型?
- 范围:变更影响哪个包/区域?
- 摘要:变更实现了什么功能?
-
如有需要,推送分支:bash
git push -u origin HEAD -
使用gh CLI并基于模板创建PR:
.github/pull_request_template.mdbashgh pr create --draft --title "<type>(<scope>): <summary>" --body "$(cat <<'EOF' ## Summary <Describe what the PR does and how to test. Photos and videos are recommended.> ## Related Linear tickets, Github issues, and Community forum posts <!-- Link to Linear ticket: https://linear.app/n8n/issue/[TICKET-ID] --> <!-- Use "closes #<issue-number>", "fixes #<issue-number>", or "resolves #<issue-number>" to automatically close issues --> ## Review / Merge checklist - [ ] PR title and summary are descriptive. ([conventions](../blob/master/.github/pull_request_title_conventions.md)) - [ ] [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up ticket created. - [ ] Tests included. - [ ] PR Labeled with `release/backport` (if the PR is an urgent fix that needs to be backported) EOF )"
PR Body Guidelines
PR正文指南
Based on :
.github/pull_request_template.md基于:
.github/pull_request_template.mdSummary Section
摘要部分
- Describe what the PR does
- Explain how to test the changes
- Include screenshots/videos for UI changes
- 描述PR的功能
- 说明如何测试变更
- 若为UI变更,包含截图/视频
Related Links Section
相关链接部分
- Link to Linear ticket:
https://linear.app/n8n/issue/[TICKET-ID] - Link to GitHub issues using keywords to auto-close:
- /
closes #123/fixes #123resolves #123
- Link to Community forum posts if applicable
- 链接至Linear工单:
https://linear.app/n8n/issue/[TICKET-ID] - 使用关键词链接GitHub issues以自动关闭:
- /
closes #123/fixes #123resolves #123
- 如有需要,链接至社区论坛帖子
Checklist
检查清单
All items should be addressed before merging:
- PR title follows conventions
- Docs updated or follow-up ticket created
- Tests included (bugs need regression tests, features need coverage)
- label added if urgent fix needs backporting
release/backport
合并前需完成所有项:
- PR标题符合规范
- 文档已更新或已创建后续工单
- 包含测试用例(Bug需添加回归测试,功能需覆盖测试)
- 若为紧急修复需向后移植,添加标签
release/backport
Examples
示例
Feature in editor
编辑器中的新功能
feat(editor): Add workflow performance metrics displayfeat(editor): Add workflow performance metrics displayBug fix in core
核心模块Bug修复
fix(core): Resolve memory leak in execution enginefix(core): Resolve memory leak in execution engineNode-specific change
特定节点变更
fix(Slack Node): Handle rate limiting in message sendfix(Slack Node): Handle rate limiting in message sendBreaking change (add exclamation mark before colon)
破坏性变更(冒号前添加感叹号)
feat(API)!: Remove deprecated v1 endpointsfeat(API)!: Remove deprecated v1 endpointsNo changelog entry
无需更新日志
refactor(core): Simplify error handling (no-changelog)refactor(core): Simplify error handling (no-changelog)No scope (affects multiple areas)
无范围(影响多个区域)
chore: Update dependencies to latest versionschore: Update dependencies to latest versionsValidation
验证规则
The PR title must match this pattern:
^(feat|fix|perf|test|docs|refactor|build|ci|chore|revert)(\([a-zA-Z0-9 ]+( Node)?\))?!?: [A-Z].+[^.]$Key validation rules:
- Type must be one of the allowed types
- Scope is optional but must be in parentheses if present
- Exclamation mark for breaking changes goes before the colon
- Summary must start with capital letter
- Summary must not end with a period
PR标题必须匹配以下模式:
^(feat|fix|perf|test|docs|refactor|build|ci|chore|revert)(\([a-zA-Z0-9 ]+( Node)?\))?!?: [A-Z].+[^.]$关键验证规则:
- 类型必须为允许的类型之一
- 范围为可选,但如果存在必须放在括号内
- 破坏性变更需在冒号前添加感叹号
- 摘要必须以大写字母开头
- 摘要结尾不得有句号