Loading...
Loading...
Compare original and translation side by side
undefinedundefinedundefinedundefinedtype(scope): subject| Type | Purpose |
|---|---|
| New feature or functionality |
| Bug fix or issue resolution |
| Code refactoring without behavior change |
| Performance improvements |
| Test additions or modifications |
| CI/CD configuration changes |
| Documentation updates |
| Maintenance, dependencies, tooling |
| Code formatting, linting (non-functional) |
| Security vulnerability fixes or hardening |
type(scope): subject| 类型 | 用途 |
|---|---|
| 新功能或功能特性 |
| Bug修复或问题解决 |
| 不改变行为的代码重构 |
| 性能优化 |
| 测试用例新增或修改 |
| CI/CD配置变更 |
| 文档更新 |
| 维护工作、依赖更新、工具调整 |
| 代码格式化、语法检查(无功能变更) |
| 安全漏洞修复或加固 |
validationauthcookie-servicetemplateconfigtestsapivalidationauthcookie-servicetemplateconfigtestsapicat .claude/CLAUDE.md 2>/dev/null | grep -A 30 -i "commit"
cat .kiro/steering/*.md 2>/dev/null | grep -A 20 -i "commit"cat .claude/CLAUDE.md 2>/dev/null | grep -A 30 -i "commit"
cat .kiro/steering/*.md 2>/dev/null | grep -A 20 -i "commit"git status
git diff --staged # if already staged
git diff # if not stagedgit status
git diff --staged # 已暂存的情况下
git diff # 未暂存的情况下git add <specific-files> # preferredgit add <特定文件> # 推荐方式
**NEVER commit**:
- `.env`, `credentials.json`, secrets
- `node_modules/`, `__pycache__/`, `.venv/`
- Large binary files without explicit approval
**禁止提交**:
- `.env`, `credentials.json`, 密钥信息
- `node_modules/`, `__pycache__/`, `.venv/`
- 未获得明确批准的大型二进制文件git commit -m "fix(auth): use hmac.compare_digest for secure comparison"git commit -m "$(cat <<'EOF'
feat(validation): add URLValidator with domain whitelist
Implement URLValidator class supporting:
- Domain whitelist enforcement (youtube.com, youtu.be)
- Dangerous scheme blocking (javascript, data, file)
- URL parsing with embedded credentials handling
Addresses Requirement 31: Input validation
Part of Task 5.1: Input Validation Utilities
EOF
)"git commit -m "fix(auth): 使用hmac.compare_digest进行安全比较"git commit -m "$(cat <<'EOF'
feat(validation): 添加带域名白名单的URLValidator
实现URLValidator类,支持:
- 域名白名单校验(youtube.com, youtu.be)
- 危险协议拦截(javascript, data, file)
- 包含嵌入式凭证的URL解析处理
对应需求31:输入校验
属于任务5.1:输入校验工具集
EOF
)"git log -1 --format="%h %s"
git show --stat HEADgit log -1 --format="%h %s"
git show --stat HEAD<blank line>
Explain HOW and WHY the change was made.
- Use bullet points for multiple items
- Wrap at 72 characters
Reference: Task X.Y
Addresses: Req N<空行>
解释更改的方式和原因。
- 多项内容使用项目符号
- 每行不超过72个字符
参考:任务X.Y
对应:需求N| Trailer | Purpose |
|---|---|
| Links and closes issue on merge |
| Same as Fixes |
| Credit co-contributors |
references/commit_examples.md| 尾部信息 | 用途 |
|---|---|
| 关联并在合并时关闭议题 |
| 与Fixes作用相同 |
| 感谢共同贡献者 |
references/commit_examples.md!BREAKING CHANGE:feat(api)!: change response format to JSON:API
BREAKING CHANGE: Response envelope changed from `{ data }` to `{ data: { type, id, attributes } }`.!BREAKING CHANGE:feat(api)!: 将响应格式改为JSON:API
BREAKING CHANGE: 响应结构从`{ data }`改为`{ data: { type, id, attributes } }`。gh pr create --title "feat(security): implement input validation (Task 5)" --body "$(cat <<'EOF'gh pr create --title "feat(security): 实现输入校验(任务5)" --body "$(cat <<'EOF'undefinedundefinedgit commit -m "fix(scope): address review comment #ID
Brief explanation of what was wrong and how it's fixed.
Addresses review comment #123456789."git commit -m "fix(scope): 处理评审意见#ID
简要说明问题所在及修复方式。
对应评审意见#123456789。"feat(validation): add URLValidator with domain whitelist
fix(auth): use hmac.compare_digest for secure key comparison
refactor(template): consolidate filename sanitization logic
test(security): add 102 path traversal prevention testsupdate validation code # no type, no scope, vague
feat: add stuff # missing scope, too vague
fix(auth): fix bug # circular, not specific
chore: make changes # missing scope, vague
feat(security): improve things. # has period, vaguefeat(validation): 添加带域名白名单的URLValidator
fix(auth): 使用hmac.compare_digest进行安全密钥比较
refactor(template): 整合文件名清理逻辑
test(security): 添加102个路径遍历防护测试用例update validation code # 无类型、无作用域、模糊
feat: add stuff # 缺少作用域、过于模糊
fix(auth): fix bug # 循环表述、不具体
chore: make changes # 缺少作用域、模糊
feat(security): improve things. # 有句号、模糊references/commit_examples.mdreferences/commit_examples.md