@spaceflow/review 0.73.0 → 0.74.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.73.0](https://github.com/Lydanne/spaceflow/compare/@spaceflow/review@0.72.0...@spaceflow/review@0.73.0) (2026-04-03)
4
+
5
+ ### 修复BUG
6
+
7
+ * **review:** 在 CI 模式下为 PR 提交 review 评论 ([39a9911](https://github.com/Lydanne/spaceflow/commit/39a9911ee356e54bd4a5b219905226b9f9b6322b))
8
+
9
+ ### 其他修改
10
+
11
+ * **review-summary:** released version 0.41.0 [no ci] ([49ebc70](https://github.com/Lydanne/spaceflow/commit/49ebc707ef33ff231d8a44614b6640a07462edca))
12
+ * **scripts:** released version 0.30.0 [no ci] ([16cb023](https://github.com/Lydanne/spaceflow/commit/16cb02382f11d77bdc3cfc156932ebc5de6a9634))
13
+ * **shell:** released version 0.30.0 [no ci] ([a54bc46](https://github.com/Lydanne/spaceflow/commit/a54bc4679f9682f9e9b86b655a8aadfacddceb68))
14
+
3
15
  ## [0.72.0](https://github.com/Lydanne/spaceflow/compare/@spaceflow/review@0.71.0...@spaceflow/review@0.72.0) (2026-04-03)
4
16
 
5
17
  ### 修复BUG
package/dist/index.js CHANGED
@@ -2349,6 +2349,12 @@ class ReviewService {
2349
2349
  if (shouldLog(verbose, 1)) {
2350
2350
  console.log("✅ 没有需要审查的文件或规则");
2351
2351
  }
2352
+ // 获取上一次的审查结果以计算正确的轮次
2353
+ let existingResult = null;
2354
+ if (ci && prNumber) {
2355
+ existingResult = await this.getExistingReviewResult(owner, repo, prNumber);
2356
+ }
2357
+ const currentRound = (existingResult?.round ?? 0) + 1;
2352
2358
  // 即使没有适用的规则,也为每个变更文件生成摘要
2353
2359
  const summary = changedFiles.filter((f)=>f.filename && f.status !== "deleted").map((f)=>({
2354
2360
  file: f.filename,
@@ -2363,7 +2369,7 @@ class ReviewService {
2363
2369
  description: prInfo.description,
2364
2370
  issues: [],
2365
2371
  summary,
2366
- round: 1
2372
+ round: currentRound
2367
2373
  };
2368
2374
  // CI 模式下也需要发送 review 评论
2369
2375
  if (ci && prNumber && !dryRun) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaceflow/review",
3
- "version": "0.73.0",
3
+ "version": "0.74.0",
4
4
  "description": "Spaceflow 代码审查插件,使用 LLM 对 PR 代码进行自动审查",
5
5
  "license": "MIT",
6
6
  "author": "Lydanne",
@@ -699,6 +699,14 @@ export class ReviewService {
699
699
  if (shouldLog(verbose, 1)) {
700
700
  console.log("✅ 没有需要审查的文件或规则");
701
701
  }
702
+
703
+ // 获取上一次的审查结果以计算正确的轮次
704
+ let existingResult: ReviewResult | null = null;
705
+ if (ci && prNumber) {
706
+ existingResult = await this.getExistingReviewResult(owner, repo, prNumber);
707
+ }
708
+ const currentRound = (existingResult?.round ?? 0) + 1;
709
+
702
710
  // 即使没有适用的规则,也为每个变更文件生成摘要
703
711
  const summary: FileSummary[] = changedFiles
704
712
  .filter((f) => f.filename && f.status !== "deleted")
@@ -718,7 +726,7 @@ export class ReviewService {
718
726
  description: prInfo.description,
719
727
  issues: [],
720
728
  summary,
721
- round: 1,
729
+ round: currentRound,
722
730
  };
723
731
 
724
732
  // CI 模式下也需要发送 review 评论