创建公关
- 作者仓库星标 190,957
- 作者仓库 n8n
- 领域
- 工程开发
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @n8n-io · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- macOS · Linux · Windows
- 运行环境要求
- Node.js
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 命令执行
- 网络行为
- 允许外网请求
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
# Create Pull Request
Creates GitHub PRs with titles that pass n8n's `check-pr-title` CI validation.
## PR Title Format
```
<type>(<scope>): <summary>
```
### Types (required)
| Type | Description | Changelog |
|------------|--------------------------------------------------|-----------|
| `feat` | New feature | Yes |
| `fix` | Bug fix | Yes |
| `perf` | Performance improvement | Yes |
| `test` | Adding/correcting tests | No |
| `docs` | Documentation only | No |
| `refactor` | Code change (no bug fix or feature) | No |
| `build` | Build system or dependencies | No |
| `ci` | CI configuration | No |
| `chore` | Routine tasks, maintenance | No |
### Scopes (optional but recommended)
- `API` - Public API changes
- `benchmark` - Benchmark CLI changes
- `core` - Core/backend/private API
- `editor` - Editor UI changes
- `* Node` - Specific node (e.g., `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 `(no-changelog)` suffix to exclude from changelog
## Steps
1. **Check current state**:
```bash
git status
git diff --stat
git log origin/master..HEAD --oneline
```
2. **Check for implementation plan**: Look for a plan file in `.claude/plans/`
that matches the current branch's ticket ID (e.g. if branch is
`scdekov/PAY-1234-some-feature`, check for `.claude/plans/PAY-1234.md`).
If a plan file exists, ask the user whether they want to include it in the
PR description as a collapsible `<details>` section (see Plan Section below).
Only include the plan if the user explicitly approves.
3. **If this is a security fix**, audit every public-facing artifact before
proceeding (see Security Fixes below).
4. **Analyze changes** to determine:
- Type: What kind of change is this?
- Scope: Which package/area is affected?
- Summary: What does the change do?
5. **Push branch if needed**:
```bash
git push -u origin HEAD
```
6. **Create PR** using gh CLI. Read `.github/pull_request_template.md` as the
body structure, then populate each section with actual content before
creating the PR:
- **Summary**: describe what the PR does
- **How to test**: describe how to test the changes. Include an example workflow if appropriate
- **Related tickets**: add the Linear ticket URL (`https://linear.app/n8n/issue/[TICKET-ID]`) and any GitHub issue links
- **Checklist**: keep as-is from the template
- Add a "🤖 PR Summary generated by AI" at the end of the body
```bash
gh pr create --draft --title "<type>(<scope>): <summary>" --body "$(cat <<'EOF'
<populated body based on pull_request_template.md>
EOF
)"
```
## PR Body Guidelines
Based on `.github/pull_request_template.md`:
### Summary Section
- Describe what the PR does
- Include screenshots/videos for UI changes
### How to test Section
- Explain how to test the changes
- Include an example workflow if appropriate
### 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 #123` / `resolves #123`
- Link to Community forum posts if applicable
### Checklist
All items should be addressed before merging:
- The human author of the PR has checked the "I have seen this code, I have run this code, and I take responsibility for this code." checkbox
- PR title follows conventions
- Docs updated or follow-up ticket created
- Tests included (bugs need regression tests, features need coverage)
- `release/backport` label added if urgent fix needs backporting
## Examples
### Feature in editor
```
feat(editor): Add workflow performance metrics display
```
### Bug fix in core
```
fix(core): Resolve memory leak in execution engine
```
### Node-specific change
```
fix(Slack Node): Handle rate limiting in message send
```
### Breaking change (add exclamation mark before colon)
```
feat(API)!: Remove deprecated v1 endpoints
```
### No changelog entry
```
refactor(core): Simplify error handling (no-changelog)
```
### No scope (affects multiple areas)
```
chore: Update dependencies to latest versions
```
## Validation
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
## Plan Section
If a matching plan file was found in `.claude/plans/` and the user has approved
including it, add a collapsible section at the end of the PR body (after the
checklist, before `EOF`):
```markdown
<details>
<summary>Implementation plan</summary>
<!-- paste plan file contents here -->
</details>
```
## Security Fixes
**This repo is public.** Never expose the attack vector in any public artifact.
Describe **what the code does**, not what threat it prevents.
| Artifact | BAD | GOOD |
|---|---|---|
| Branch | `fix-sql-injection-in-webhook` | `fix-webhook-input-validation` |
| PR title | `fix(core): Prevent SSRF` | `fix(core): Validate outgoing URLs` |
| Commit msg | `fix: prevent denial of service` | `fix: add payload size validation` |
| PR body | *"attacker could trigger SSRF…"* | *"validates URL protocol and host"* |
| Linear ref | URL with slug (leaks title) | URL without slug or ticket ID only |
| Test name | `'should prevent SQL injection'` | `'should sanitize query parameters'` |
**Before pushing a security fix, verify:** no branch name, commit, PR title,
PR body, Linear URL, test name, or code comment hints at the vulnerability.
**When in doubt, check the Linear issue for possible extra precautions**
章节与文件索引
按说明文件中的顺序排列。
类型(必填)
范围(可选但推荐)
规则概要
步骤
公关机构指南
文件/命令 -> check-pr-title · feat · fix · perf · test · docs · refactor · build
内容校验值 -> 85640b888ec0
当前原文的自动摘译,尚未人工审校。
类型(必填)
类型 · 描述 · 变更日志
feat· 新功能 · 是fix· 错误修复 · 是perf· 性能改进 · 是test· 添加/更正测试 · 否范围(可选但推荐)
API- 公共 API 更改benchmark- 基准 CLI 更改core- 核心/后端/私有 APIeditor- 编辑器 UI 更改* Node- 特定节点(例如,Slack Node、GitHub Node)规则概要
使用命令式现在时:“Add”而不是“Added” 第一个字母大写 末尾没有句点 无票证 ID(例如 N8N-1234) 添加
(no-changelog)后缀以从变更日志中排除步骤
检查当前状态:检查实施计划:在
.claude/plans/中查找与当前分支的工单ID匹配的计划文件(例如,如果分支是scdekov/PAY-1234-some-feature,则检查.claude/plans/PAY-1234.md)。如果计划文件存在,询问用户是否要将其包含在计划文件中公关机构指南
基于
.github/pull_request_template.md: