@spaceflow/review 0.72.0 → 0.73.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.72.0](https://github.com/Lydanne/spaceflow/compare/@spaceflow/review@0.71.0...@spaceflow/review@0.72.0) (2026-04-03)
4
+
5
+ ### 修复BUG
6
+
7
+ * **review:** 为 skipDuplicateWorkflow 添加错误处理以应对权限不足问题 ([6d0292d](https://github.com/Lydanne/spaceflow/commit/6d0292d20b6eba790f594c555ceb18b75ebfe253))
8
+
9
+ ### 其他修改
10
+
11
+ * **core:** released version 0.28.0 [no ci] ([6baebaa](https://github.com/Lydanne/spaceflow/commit/6baebaa4cd777b6f8babcb5d8a2f25c426f8da05))
12
+ * **publish:** released version 0.52.0 [no ci] ([bcbc2a9](https://github.com/Lydanne/spaceflow/commit/bcbc2a97e5bdedfd728330a33f19ec9172d80f40))
13
+ * **review-summary:** released version 0.40.0 [no ci] ([9c5c262](https://github.com/Lydanne/spaceflow/commit/9c5c26256984c9349def2801af6e77b7013e703f))
14
+
3
15
  ## [0.71.0](https://github.com/Lydanne/spaceflow/compare/@spaceflow/review@0.70.0...@spaceflow/review@0.71.0) (2026-04-02)
4
16
 
5
17
  ### 新特性
package/dist/index.js CHANGED
@@ -2357,7 +2357,7 @@ class ReviewService {
2357
2357
  summary: applicableSpecs.length === 0 ? "无适用的审查规则" : "已跳过"
2358
2358
  }));
2359
2359
  const prInfo = context.generateDescription && llmMode ? await this.generatePrDescription(commits, changedFiles, llmMode, undefined, verbose) : await this.buildFallbackDescription(commits, changedFiles);
2360
- return {
2360
+ const result = {
2361
2361
  success: true,
2362
2362
  title: prInfo.title,
2363
2363
  description: prInfo.description,
@@ -2365,6 +2365,17 @@ class ReviewService {
2365
2365
  summary,
2366
2366
  round: 1
2367
2367
  };
2368
+ // CI 模式下也需要发送 review 评论
2369
+ if (ci && prNumber && !dryRun) {
2370
+ if (shouldLog(verbose, 1)) {
2371
+ console.log(`💬 提交 PR 评论...`);
2372
+ }
2373
+ await this.postOrUpdateReviewComment(owner, repo, prNumber, result, verbose, autoApprove);
2374
+ if (shouldLog(verbose, 1)) {
2375
+ console.log(`✅ 评论已提交`);
2376
+ }
2377
+ }
2378
+ return result;
2368
2379
  }
2369
2380
  const headSha = pr?.head?.sha || headRef || "HEAD";
2370
2381
  const fileContents = await this.getFileContents(owner, repo, changedFiles, commits, headSha, prNumber, verbose, isLocalMode);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaceflow/review",
3
- "version": "0.72.0",
3
+ "version": "0.73.0",
4
4
  "description": "Spaceflow 代码审查插件,使用 LLM 对 PR 代码进行自动审查",
5
5
  "license": "MIT",
6
6
  "author": "Lydanne",
@@ -712,7 +712,7 @@ export class ReviewService {
712
712
  context.generateDescription && llmMode
713
713
  ? await this.generatePrDescription(commits, changedFiles, llmMode, undefined, verbose)
714
714
  : await this.buildFallbackDescription(commits, changedFiles);
715
- return {
715
+ const result: ReviewResult = {
716
716
  success: true,
717
717
  title: prInfo.title,
718
718
  description: prInfo.description,
@@ -720,6 +720,19 @@ export class ReviewService {
720
720
  summary,
721
721
  round: 1,
722
722
  };
723
+
724
+ // CI 模式下也需要发送 review 评论
725
+ if (ci && prNumber && !dryRun) {
726
+ if (shouldLog(verbose, 1)) {
727
+ console.log(`💬 提交 PR 评论...`);
728
+ }
729
+ await this.postOrUpdateReviewComment(owner, repo, prNumber, result, verbose, autoApprove);
730
+ if (shouldLog(verbose, 1)) {
731
+ console.log(`✅ 评论已提交`);
732
+ }
733
+ }
734
+
735
+ return result;
723
736
  }
724
737
 
725
738
  const headSha = pr?.head?.sha || headRef || "HEAD";