docs(harness): commit 规范分两层,squash 用 PR description - #2650
Conversation
回应 issue #2615:仓库 squash 设置改用 PR description(PR_BODY),收尾 时把 PR title+desc 维护成 Conventional Commits 总结。commit 规范分两层 (依据 Conventional Commits 1.0.0):单个迭代 commit 宽松 / 需要额外 提供 commit message 的 merge 严格。 - AGENTS.md「提交流程」加两层 commit 规范 - pr-finishing skill 加「收尾维护 PR title+desc」步骤(design.md 决策 12) - CLAUDE.local.md Conventional Commits 重新定位两层 Closes #2615 Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
- AGENTS.md:squash → squash/merge commit 都用 PR description(+ rebase 靠 commit 本身) - SKILL.md 流程 5:去假设、直接陈述;关联仓未切 PR desc 时暂缓整理 - SKILL.md 流程 7 + design.md 决策 11:fetch https → origin(标准 remote,非本地约定) - design.md 决策 12:标题准确化 + 本项目设置/查询命令 + ## 截断标「待验证,非合同」 Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
实测 squash 取整段 desc(`##` 截断假设错),改为:desc 给 reviewer、 commit message 给 git 历史的分工,merge 时 review/edit commit message。 - AGENTS.md:两层规范第二条改「merge 时 review/edit commit message」,去 ## 截断错误 - SKILL.md 流程 5:merge 前/时整理 commit message(gh pr merge --subject --body / 网页框),不改 desc - design.md 决策 12:方法论 + 实测取整段 + CodeRabbit summary 进 desc 机制 Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthrough本次变更新增 commit 与 PR 规范,更新 PR 合并前检查、关联 PR 校验、分支清理提示及 CodeRabbit walkthrough 配置。 Changes提交信息与 PR 收尾流程
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@AGENTS.md`:
- Line 105: 统一合并流程表述:在 AGENTS.md 第105行将“AI 用 gh pr merge”改为 AI 仅生成命令、由用户确认并执行;在
skills/zzz-od-dev-pr-finishing/design.md 第36-40行和
skills/zzz-od-dev-pr-finishing/SKILL.md 第63-66行保留命令示例并明确 AI 不执行 merge,确保三处边界一致。
In `@skills/zzz-od-dev-pr-finishing/design.md`:
- Line 31: Update the branch comparison guidance in
skills/zzz-od-dev-pr-finishing/design.md:31-31 and
skills/zzz-od-dev-pr-finishing/SKILL.md:75-75 to compare origin/main against
origin/<同名分支> after fetching, not an unconstrained local branch. Also require
checking for relevant unpushed local commits so the verification cannot skip
changes that exist only locally; preserve the existing validation that detects
test-repository commits absent from the main branch.
- Around line 36-38: 更新本项目设置中查询 GitHub 仓库合并配置的记录,使用 gh api 同时读取
squash_merge_commit_title、merge_commit_title、squash_merge_commit_message 和
merge_commit_message;明确说明 squash 与 merge commit 均为
*_title=PR_TITLE、*_message=PR_BODY,并保留现有查询说明。
In `@skills/zzz-od-dev-pr-finishing/SKILL.md`:
- Line 15: 更新关联 PR 收尾说明及其外部引用,确保 docs/develop/development_workflow.md 中 Line 48
的流程编号从 §6 改为 §7,并指向“关联 PR”流程。
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: ec25a0dd-bdfa-4411-bcd5-56e464a26924
📒 Files selected for processing (3)
AGENTS.mdskills/zzz-od-dev-pr-finishing/SKILL.mdskills/zzz-od-dev-pr-finishing/design.md
- high_level_summary_in_walkthrough: true:summary 放 comment,不进 PR desc/commit body - high_level_summary_instructions:Keep a Changelog 分类(Added/Changed/Deprecated/Removed/Fixed/Security),只写 what - 配合「作者写 desc 作 commit body」:CR summary 给 review,作者写 why 进 body Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
- AGENTS.md:commit/PR 规范重组 5 点(单个 commit / PR title / PR desc why+改动要点+关联 / merge 时编辑 / rebase) - SKILL.md:流程 5+6 整合成「合并前」,原 7→6(关联 PR);合并后清理单独章节;不主动 merge - design.md 决策 12:方法论(作者写/合并者 review)+ CR summary 配置 + 查询 4 字段 + 实测取整段;决策 11 origin/<同名分支>;§6 - development_workflow.md L46:§6 Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@AGENTS.md`:
- Line 110: 统一 AGENTS.md 第110行与 skills/zzz-od-dev-pr-finishing/SKILL.md 第65行的
merge 执行边界:在 AGENTS.md 中将“作者按上面写好就直接 merge”改为由用户或合并者确认并执行 merge,AI 仅提供检查结果和命令;在
SKILL.md 对应位置保留 AI 不主动执行 merge,并采用与 AGENTS.md 一致的表述。
In `@skills/zzz-od-dev-pr-finishing/SKILL.md`:
- Around line 63-65: 将 SKILL.md 中涉及
zzz-od-test、origin/main、测试仓合并顺序及其他仓库专属流程移至同目录 design.md;在 SKILL.md 中改用适用于 fork
的通用占位符,并保留可复用的方法论。更新其中的 gh pr list --head 命令,显式加入 --repo <测试仓
owner/repo>,同时确保相关段落不再硬编码具体远端、分支或仓库。
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 593281ec-a287-4a05-adfa-de5fa728e096
📒 Files selected for processing (3)
AGENTS.mdskills/zzz-od-dev-pr-finishing/SKILL.mdskills/zzz-od-dev-pr-finishing/design.md
🚧 Files skipped from review as they are similar to previous changes (1)
- skills/zzz-od-dev-pr-finishing/design.md
- SKILL.md 流程 6 + design.md 决策 11:gh pr list --head → --repo OneDragon-Anything/zzz-od-test --head Co-Authored-By: Claude Code <noreply@anthropic.com> Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
|
兔子的设置在哪里改? |
回应 issue #2615(@ShadowLemoon):squash 后拼迭代 commit,可读性低。仓库 squash + merge commit 设置改用 PR description,收尾时维护 PR title + description 成 Conventional Commits;commit 规范分两层(单个迭代 commit 宽松 / 需要 commit message 的 merge 严格)。两层规范在 AGENTS.md,收尾动作在 pr-finishing skill。
关联
PR_BODY+PR_TITLEgh pr merge --subject --body单独定(desc 给 review,commit message 给 history)Summary by CodeRabbit