Skip to content

Add bot-review mode for CI/CD non-interactive PR code review.#3300

Merged
shlzxjp merged 12 commits intomainfrom
feature/kevingpqi_cr_bot
Mar 24, 2026
Merged

Add bot-review mode for CI/CD non-interactive PR code review.#3300
shlzxjp merged 12 commits intomainfrom
feature/kevingpqi_cr_bot

Conversation

@kevingpqi123
Copy link
Copy Markdown
Collaborator

为 /cr 技能添加 bot 模式,支持在 CI/CD 流水线中进行非交互式 PR 代码审查。

主要变更:

  • 新增 bot-review.md 参考文档,定义 bot 模式的完整审查流程
  • 更新 SKILL.md 路由表,添加 bot 模式入口
  • bot 模式使用 reviewer-verifier 对抗机制确保审查质量
  • 审查结果以行级评论形式发布到 PR

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.21%. Comparing base (1db9626) to head (5db4bdc).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3300      +/-   ##
==========================================
- Coverage   75.29%   75.21%   -0.09%     
==========================================
  Files         504      509       +5     
  Lines       33422    35211    +1789     
  Branches    10673    11270     +597     
==========================================
+ Hits        25166    26483    +1317     
- Misses       6032     6422     +390     
- Partials     2224     2306      +82     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread .codebuddy/skills/cr/references/bot-review.md Outdated
Comment thread .codebuddy/skills/cr/references/bot-review.md Outdated
Comment thread .codebuddy/skills/cr/references/bot-review.md Outdated
…/libpag into feature/kevingpqi_cr_bot

* 'feature/kevingpqi_cr_bot' of https://github.com/Tencent/libpag:
  Add NativeWindow ownership tracking to prevent double-free on HarmonyOS. (#3309)
  Merge spec publish into playground publish script and add skill-creator skill (#3307)
  Improve skills page content and optimize publish script (#3306)
  Add PAGX AI Skills documentation page with bilingual support (#3304)
  Switch libxml2 to static vcpkg build on all platforms. (#3303)
  Add pagx CLI npm package release workflow and playground improvements (#3301)
  Replace ffaudio with ffmovie for audio encoding. (#3297)
  Fix codeformat script for PEP 668 and apply code formatting. (#3299)
Comment on lines +152 to +154
After forwarding the last reviewer's report to the verifier, send a separate
message stating: "All N reviewer reports have been forwarded. Please finalize
your verdicts for all issues above." (Replace N with the actual reviewer count.)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

teams-review.md中也有“Completion signal”,内容是重复的

Image

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已删除


---

## Exit Codes
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

退出码机制是否必要,skill 是 markdown 指令而非可执行程序,需确认框架是否支持退出码。

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的退出码机制是给流水线使用的,如果有一些异常情况,可以及时通知出来


If diff is empty → print "No changes to review." and stop.

If diff exceeds 200 lines, first run `git diff --stat` for overview, then read
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

缺少 diff 上限保护,超大 PR 可能导致上下文爆炸

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已增加限制

@@ -0,0 +1,344 @@
# Bot Review
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR并发需要考虑吗

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Phase 1 中 git fetch origin pull/{number}/head:pr-{number} 创建的本地分支名带了 PR 编号(pr-{number}),所以不同 PR 的分支名不会冲突, 即便是通过一个 PR 被触发多次,流水线中有排队策略,也没有问题

@shlzxjp shlzxjp merged commit b0d3691 into main Mar 24, 2026
8 checks passed
@shlzxjp shlzxjp deleted the feature/kevingpqi_cr_bot branch March 24, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants