fix(release): synchronize ClawHub skill version - #35
Conversation
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 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 |
Reviewer's Guide该 PR 更新了 ClawHub 的发布逻辑:仅在技能内容发生变更时才强制并要求 javdb-cli 技能版本;将技能元数据同步到 v0.7.2;在扩展工作流测试以验证条件版本检查的同时,文档化新的发布处理规则。 更新后的 ClawHub 发布版本检查流程图flowchart TD
A[Start publish-clawhub job] --> B[Read skill_version from skills/javdb-cli/SKILL.md]
B --> C[Assert exactly one version line]
C --> D[git cat-file SKILL.md at RELEASE_TAG]
D --> E[Compute previous_tag with scripts/previous-release-tag.sh]
E --> F{previous_tag is empty}
F --> G[Enforce skill_version equals RELEASE_TAG#v]
G --> H[Set publish=true]
F --> I{git diff --quiet previous_tag RELEASE_TAG -- skills/javdb-cli}
I --> J[Set publish=false and log Skill unchanged; skipping ClawHub publication]
I --> K[Enforce skill_version equals RELEASE_TAG#v]
K --> L[Set publish=true]
文件级变更
Tips and commandsInteracting with Sourcery
Customizing Your Experience访问你的 dashboard 来:
Getting HelpOriginal review guide in EnglishReviewer's GuideThe PR updates ClawHub publishing logic to only enforce and require the javdb-cli skill version when the skill contents have changed, synchronizes the skill metadata to v0.7.2, and documents the new release-handling rules while extending the workflow test to validate the conditional version checks. Flow diagram for updated ClawHub publish version checksflowchart TD
A[Start publish-clawhub job] --> B[Read skill_version from skills/javdb-cli/SKILL.md]
B --> C[Assert exactly one version line]
C --> D[git cat-file SKILL.md at RELEASE_TAG]
D --> E[Compute previous_tag with scripts/previous-release-tag.sh]
E --> F{previous_tag is empty}
F --> G[Enforce skill_version equals RELEASE_TAG#v]
G --> H[Set publish=true]
F --> I{git diff --quiet previous_tag RELEASE_TAG -- skills/javdb-cli}
I --> J[Set publish=false and log Skill unchanged; skipping ClawHub publication]
I --> K[Enforce skill_version equals RELEASE_TAG#v]
K --> L[Set publish=true]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - 我在这里给出了一些高层次的反馈:
test-clawhub-publish-workflow.sh中的 Ruby 校验依赖对工作流文本进行脆弱的字符串/子字符串匹配;建议改为解析 YAML 结构(例如使用专门的工具),这样未来格式或措辞的变更就不会在不知不觉中破坏这项检查。- 对技能版本检查字符串的要求是必须恰好出现两次(
block.scan(needle).length == 2),这会让测试与当前实现强耦合;如果改为只断言相对顺序和存在性,而不是硬性计数,将会让工作流在面对小规模重构时更加稳健。
面向 AI 代理的提示
Please address the comments from this code review:
## Overall Comments
- The Ruby validation in `test-clawhub-publish-workflow.sh` relies on brittle string/substring matching of the workflow text; consider parsing the YAML structure (e.g., via a dedicated tool) so future formatting or wording changes don’t silently break the check.
- The requirement that the skill version check string appear exactly twice (`block.scan(needle).length == 2`) tightly couples the test to the current implementation; loosening this to assert relative ordering and presence rather than hard counts would make the workflow more resilient to minor refactors.帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据这些反馈改进后续评审。
Original comment in English
Hey - I've left some high level feedback:
- The Ruby validation in
test-clawhub-publish-workflow.shrelies on brittle string/substring matching of the workflow text; consider parsing the YAML structure (e.g., via a dedicated tool) so future formatting or wording changes don’t silently break the check. - The requirement that the skill version check string appear exactly twice (
block.scan(needle).length == 2) tightly couples the test to the current implementation; loosening this to assert relative ordering and presence rather than hard counts would make the workflow more resilient to minor refactors.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The Ruby validation in `test-clawhub-publish-workflow.sh` relies on brittle string/substring matching of the workflow text; consider parsing the YAML structure (e.g., via a dedicated tool) so future formatting or wording changes don’t silently break the check.
- The requirement that the skill version check string appear exactly twice (`block.scan(needle).length == 2`) tightly couples the test to the current implementation; loosening this to assert relative ordering and presence rather than hard counts would make the workflow more resilient to minor refactors.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary
Validation
This repairs the v0.7.2 release handoff before rebuilding the immutable tag.
Summary by Sourcery
同步 ClawHub 技能版本处理逻辑与最新发布变更,并记录相应的发布要求。
Bug Fixes(错误修复):
javdb-cli的 ClawHub 技能元数据及已发布版本引用与v0.7.2版本保持同步。Enhancements(增强):
Documentation(文档):
Tests(测试):
Original summary in English
Summary by Sourcery
Synchronize ClawHub skill version handling with release changes and document the resulting release requirements.
Bug Fixes:
Enhancements:
Documentation:
Tests:
Bug 修复:
javdb-cli技能的元数据版本与v0.7.2发布版本同步。增强功能:
测试:
Original summary in English
Summary by Sourcery
同步 ClawHub 技能版本处理逻辑与最新发布变更,并记录相应的发布要求。
Bug Fixes(错误修复):
javdb-cli的 ClawHub 技能元数据及已发布版本引用与v0.7.2版本保持同步。Enhancements(增强):
Documentation(文档):
Tests(测试):
Original summary in English
Summary by Sourcery
Synchronize ClawHub skill version handling with release changes and document the resulting release requirements.
Bug Fixes:
Enhancements:
Documentation:
Tests: