Merged
feat(skill): Add pypto-machine-code-review skill, remove pypto-aicpu-perf-coding #5219
gaoxingwangAdd on Jul 31
feat(skill): Add pypto-machine-code-review skill, remove pypto-aicpu-perf-coding #5219
Merged
Pull Request has been successfully merged by CANN-robot.
(Thank you for gaoxingwang's contribution.)Jul 31 Created pull request, commit 7d0c9062
atomgit-bot
Jul 31 Comments:
Jul 31 Comments:
变更摘要
此 PR 主要新增了 pypto-machine-code-review 技能,用于在 GitCode PR 上批量提交行级代码检视意见(diff_comment),同时移除了原有的 pypto-aicpu-perf-coding 技能,将后者功能合并到新技能中。核心交付物是新增的 submit_review_comments.py 脚本,该脚本封装了 GitCode API 的认证、评论提交与验证全流程。
主要改动
- 新增
submit_review_comments.py脚本:实现批量向 GitCode PR 提交行级 diff_comment 的完整工具链,包含ReviewComment数据类、submit_comment()提交函数、verify_diff_comment()验证函数以及 CLI 入口main(),支持命令行逐条指定或 JSON 文件批量导入评论 - Token 自动提取与验证:通过
extract_token_from_git()从git remoteURL 自动解析 oauth2 token,配合verify_token()校验 token 有效性,简化认证流程 - 双模式评论输入:CLI 支持
--comment "path:position:body"逐条传入和--file comments.json批量加载两种方式,自动解析Blocker/Major/Minor等级标签 - Diff Comment 验证机制:
verify_diff_comment()通过分页拉取 PR 评论列表,按position+body前缀匹配,验证提交的评论是否真正成为行级 diff_comment,并提供--no-verify跳过选项 - 移除
pypto-aicpu-perf-coding技能:将其功能并入新增的pypto-machine-code-review技能中,精简技能结构


Incorrect?
atomgit-bot
Jul 31 Comments:
Jul 31 Comments:
代码审查
关闭摘要
本次审查覆盖了全部 7 个变更文件,结果如下:
| 文件 | 审查结论 |
|---|---|
.agents/skills/pypto-machine-code-review/SKILL.md |
无问题 |
.agents/skills/pypto-machine-code-review/references/gitcode-review-api.md |
无问题 |
.agents/skills/pypto-machine-code-review/references/memory-rules.md |
无问题 |
.agents/skills/pypto-machine-code-review/references/perf-rules.md |
1 个 P3(stale skill 名称引用) |
.agents/skills/pypto-machine-code-review/references/review-checklist.md |
无问题 |
.agents/skills/pypto-machine-code-review/scripts/submit_review_comments.py |
2 个 P3(缺少错误处理、docstring 示例不一致) |
AGENTS.md |
无问题 |
按优先级统计:P0: 0,P1: 0,P2: 0,P3: 3。
整体风险判断:低。此 PR 为纯文档和工具脚本变更(新增 code review skill 的 Markdown 指南和辅助脚本),不涉及任何生产代码路径。3 个 P3 发现均为文档/工具层面的小问题——脚本缺少错误处理、过期的 skill 名称引用、docstring 示例与代码行为不一致——均不影响核心功能,可在后续迭代中修复。
| 类型 | 数量 |
|---|---|
| 🔴 阻塞 | 2 |
| 🟡 建议 | 1 |
⛔ 需要修改


Incorrect?
Jul 31 Added label: cann-cla/yes
CANN-robot
Jul 31 Comments:
Jul 31 Comments:
Thanks for your pull-request.
The full list of commands accepted by me can be found at here。
You can get sig-info at here
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| repo-cann/pypto | ✅ jason_yuan_ye, 尹杰 (2/2) | ✅ jason_yuan_ye (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
gaoxingwang, thanks for your pull request. All authors of the commits have signed the CLA. 👍


50 messages are collapsed here。 See more
Jie Yin
Aug 3 Comments:
Aug 3 Comments:
/lgtm


袁野
Aug 3 Comments:
Aug 3 Comments:
/approve


Aug 3 Added label: lgtmapproved
Aug 3 Resolved final issue
Aug 3 Merged pull request
Merge pypto-aicpu-perf-coding into pypto-machine-code-review. See commit message for details.