@spaceflow/review 0.73.0 → 0.75.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 +22 -0
- package/dist/index.js +7 -1
- package/package.json +2 -2
- package/src/review.service.ts +9 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.74.0](https://github.com/Lydanne/spaceflow/compare/@spaceflow/review@0.73.0...@spaceflow/review@0.74.0) (2026-04-03)
|
|
4
|
+
|
|
5
|
+
### 修复BUG
|
|
6
|
+
|
|
7
|
+
* **review:** 修正无需审查文件时的轮次计算 ([0ee902e](https://github.com/Lydanne/spaceflow/commit/0ee902e6d3a4b2c09efa99d86b3aca4806508fb1))
|
|
8
|
+
|
|
9
|
+
### 其他修改
|
|
10
|
+
|
|
11
|
+
* **review-summary:** released version 0.42.0 [no ci] ([6e397e5](https://github.com/Lydanne/spaceflow/commit/6e397e5d389c385142d52b29b0332130be5245cd))
|
|
12
|
+
|
|
13
|
+
## [0.73.0](https://github.com/Lydanne/spaceflow/compare/@spaceflow/review@0.72.0...@spaceflow/review@0.73.0) (2026-04-03)
|
|
14
|
+
|
|
15
|
+
### 修复BUG
|
|
16
|
+
|
|
17
|
+
* **review:** 在 CI 模式下为 PR 提交 review 评论 ([39a9911](https://github.com/Lydanne/spaceflow/commit/39a9911ee356e54bd4a5b219905226b9f9b6322b))
|
|
18
|
+
|
|
19
|
+
### 其他修改
|
|
20
|
+
|
|
21
|
+
* **review-summary:** released version 0.41.0 [no ci] ([49ebc70](https://github.com/Lydanne/spaceflow/commit/49ebc707ef33ff231d8a44614b6640a07462edca))
|
|
22
|
+
* **scripts:** released version 0.30.0 [no ci] ([16cb023](https://github.com/Lydanne/spaceflow/commit/16cb02382f11d77bdc3cfc156932ebc5de6a9634))
|
|
23
|
+
* **shell:** released version 0.30.0 [no ci] ([a54bc46](https://github.com/Lydanne/spaceflow/commit/a54bc4679f9682f9e9b86b655a8aadfacddceb68))
|
|
24
|
+
|
|
3
25
|
## [0.72.0](https://github.com/Lydanne/spaceflow/compare/@spaceflow/review@0.71.0...@spaceflow/review@0.72.0) (2026-04-03)
|
|
4
26
|
|
|
5
27
|
### 修复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:
|
|
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.
|
|
3
|
+
"version": "0.75.0",
|
|
4
4
|
"description": "Spaceflow 代码审查插件,使用 LLM 对 PR 代码进行自动审查",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Lydanne",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@spaceflow/cli": "0.40.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@spaceflow/core": "0.
|
|
31
|
+
"@spaceflow/core": "0.29.0"
|
|
32
32
|
},
|
|
33
33
|
"spaceflow": {
|
|
34
34
|
"type": "flow",
|
package/src/review.service.ts
CHANGED
|
@@ -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:
|
|
729
|
+
round: currentRound,
|
|
722
730
|
};
|
|
723
731
|
|
|
724
732
|
// CI 模式下也需要发送 review 评论
|