公关
- 作者仓库星标 534
- 作者仓库 couchers
- 领域
- 工程开发
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @Couchers-org · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 读取环境变量
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
# Create a Pull Request
Create a branch, commit, push, and open a PR for the current changes.
## Steps
### 1. Assess the current state
Run in parallel:
- `git status` (never use `-uall`)
- `git diff` and `git diff --staged` to understand all changes
- `git log --oneline -5` to see recent commit message style
Identify which files should be committed. Do NOT commit files that are:
- Scratch/debug/temporary files
- Files containing secrets (`.env`, credentials, etc.)
If there are no meaningful changes to commit, tell the user and stop.
### 2. Determine the branch name
Branch names in this repo follow the pattern: `<area>/<type>/<short-description>`
Where:
- `<area>` is one of: `backend`, `web`, `frontend`, `mobile`, `devops`, `docs`, or another area that matches the changed files. For cross-cutting changes spanning multiple areas, pick the one that best describes the change.
- `<type>` is one of: `feature`, `bugfix`, `fix`, `refactor`, or similar
- `<short-description>` is a short kebab-case description
Infer area and type from the changed files and the nature of the changes. Never use a username as the area.
### 3. Run linters and formatters
Before committing, run the appropriate linters and formatters for the changed areas:
- **Backend**: `make format` and `make mypy` from `/app/backend`
- **Web/Frontend**: lint/format as appropriate
Fix any issues before proceeding. If linters produce changes, include those in the commit.
### 4. Create the branch and commit
If there are already commits on the current branch and no uncommitted changes remain (e.g. changes were already committed earlier), skip the commit and proceed to pushing.
Otherwise:
```
git checkout -b <branch-name>
git add <specific files> # add only the relevant files by name
git commit -m "<message>"
```
Write a concise commit message (1-2 sentences) that describes what changed and why.
### 5. Push the branch
```
git push -u origin <branch-name>
```
### 6. Create the PR
Read the PR template from `.github/pull_request_template.md` in this repo. Fill it in based on the actual changes:
- Fill in the description at the top (what and why)
- Fill in the Testing section with what was done or what should be done
- Include the appropriate checklist(s) — backend, web, or both — based on which areas were changed. Remove checklists that don't apply.
- Keep the "For maintainers" section as-is
- Append the following note as the very last line of the PR body, after the "For maintainers" section (separated by a blank line):
```
_This PR was created with the Couchers PR skill._
```
```bash
gh pr create --base develop --title "<short title>" --body "$(cat <<'EOF'
<filled-in PR template>
_This PR was created with the Couchers PR skill._
EOF
)"
```
### 7. Report back
Tell the user the PR URL when done.
章节与文件索引
按说明文件中的顺序排列。
1. 评估当前状态
2.确定分支名称
3. 运行 linter 和格式化程序
4. 创建分支并提交
6. 创建 PR
文件/命令 -> git status · -uall · git diff · git diff --staged · git log --oneline -5 · .env · <area>/<type>/<short-description> · <area>
内容校验值 -> 713e8ba0cfae
当前原文的自动摘译,尚未人工审校。
1. 评估当前状态
并行运行:
git status(切勿使用-uall)git diff和git diff --staged以了解所有更改git log --oneline -5以查看最近的提交消息样式确定应提交哪些文件。不要提交以下文件:2.确定分支名称
此存储库中的分支名称遵循以下模式:
<area>/<type>/<short-description>其中:<area>是以下之一:backend、web、frontend、mobile、devops、docs或与更改的文件匹配的其他区域。对于跨越多个领域的横切变更,请选择最能描述变更的变更。<type>是以下之一:feature、bugfix、fix、refactor或类似<short-description>是一个简短的 kebab-case 描述3. 运行 linter 和格式化程序
在提交之前,为更改的区域运行适当的 linter 和格式化程序: 后端:来自
/app/backend的make format和make mypyWeb/前端:适当的 lint/format 在继续之前修复任何问题。如果 linter 产生更改,请将这些更改包含在提交中。4. 创建分支并提交
如果当前分支上已经有提交并且没有未提交的更改(例如之前已经提交了更改),则跳过提交并继续推送。否则:编写一条简洁的提交消息(1-2 句话)来描述更改的内容和原因。
6. 创建 PR
阅读本存储库中
.github/pull_request_template.md的 PR 模板。根据实际更改填写:在顶部填写描述(内容和原因) 在测试部分填写已完成的内容或应该完成的内容 根据更改的区域,包含适当的清单(后端、Web 或两者)。删除不适用的清单。保持“对于维护者”部分不变