@spaceflow/review 0.60.0 → 0.61.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 +18 -0
- package/dist/index.js +5 -3
- package/package.json +1 -1
- package/src/review.service.ts +8 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.60.0](https://github.com/Lydanne/spaceflow/compare/@spaceflow/review@0.59.0...@spaceflow/review@0.60.0) (2026-03-02)
|
|
4
|
+
|
|
5
|
+
### 代码重构
|
|
6
|
+
|
|
7
|
+
* **review:** 优化问题验证逻辑,将 resolved 状态纳入有效性判断 ([1e2302d](https://github.com/Lydanne/spaceflow/commit/1e2302d81cd0f653d606483ef6c9138143ca6d60))
|
|
8
|
+
|
|
9
|
+
### 代码格式
|
|
10
|
+
|
|
11
|
+
* 格式化代码并更新 Prettier 忽略规则 ([baed10e](https://github.com/Lydanne/spaceflow/commit/baed10e7cd91fda1285d7e2e0019d291cb563055))
|
|
12
|
+
|
|
13
|
+
### 其他修改
|
|
14
|
+
|
|
15
|
+
* **core:** released version 0.23.0 [no ci] ([07a2d7d](https://github.com/Lydanne/spaceflow/commit/07a2d7d51223aeb98161f91fa931b4cb63b03cda))
|
|
16
|
+
* **publish:** released version 0.47.0 [no ci] ([3f59345](https://github.com/Lydanne/spaceflow/commit/3f593450066c9138adac5b101edb8057a5de1ff6))
|
|
17
|
+
* **review-summary:** released version 0.27.0 [no ci] ([90ac2a4](https://github.com/Lydanne/spaceflow/commit/90ac2a44706ddb2dd231ea57d3734c7445565ee9))
|
|
18
|
+
* **scripts:** released version 0.24.0 [no ci] ([717de65](https://github.com/Lydanne/spaceflow/commit/717de6571faa2cb24f04b7493e7fd6d8404f2bd5))
|
|
19
|
+
* **shell:** released version 0.24.0 [no ci] ([5694d19](https://github.com/Lydanne/spaceflow/commit/5694d193f9207e41e840d9ebaa5a43e3527e6af8))
|
|
20
|
+
|
|
3
21
|
## [0.59.0](https://github.com/Lydanne/spaceflow/compare/@spaceflow/review@0.58.0...@spaceflow/review@0.59.0) (2026-03-02)
|
|
4
22
|
|
|
5
23
|
### 新特性
|
package/dist/index.js
CHANGED
|
@@ -2242,6 +2242,8 @@ class ReviewService {
|
|
|
2242
2242
|
if (shouldLog(verbose, 1)) {
|
|
2243
2243
|
console.log(`📋 已有评论中存在 ${existingIssues.length} 个问题`);
|
|
2244
2244
|
}
|
|
2245
|
+
// 先同步最新的 resolved 状态,确保后续 invalidate/verify 能正确跳过已解决的问题
|
|
2246
|
+
await this.syncResolvedComments(owner, repo, prNumber, existingResult);
|
|
2245
2247
|
// 如果文件有变更,将该文件的历史问题标记为无效
|
|
2246
2248
|
// 简化策略:避免复杂的行号更新逻辑
|
|
2247
2249
|
const reviewConf = this.config.getPluginConfig("review");
|
|
@@ -2451,7 +2453,7 @@ class ReviewService {
|
|
|
2451
2453
|
const total = issues.length;
|
|
2452
2454
|
const fixed = issues.filter((i)=>i.fixed).length;
|
|
2453
2455
|
const resolved = issues.filter((i)=>i.resolved && !i.fixed).length;
|
|
2454
|
-
const invalid = issues.filter((i)=>i.valid === "false").length;
|
|
2456
|
+
const invalid = issues.filter((i)=>i.valid === "false" && !i.fixed && !i.resolved).length;
|
|
2455
2457
|
const pending = total - fixed - resolved - invalid;
|
|
2456
2458
|
const fixRate = total > 0 ? Math.round(fixed / total * 100 * 10) / 10 : 0;
|
|
2457
2459
|
const resolveRate = total > 0 ? Math.round((fixed + resolved) / total * 100 * 10) / 10 : 0;
|
|
@@ -3267,7 +3269,7 @@ ${fileChanges || "无"}`;
|
|
|
3267
3269
|
console.warn("⚠️ 更新 PR 标题失败:", error);
|
|
3268
3270
|
}
|
|
3269
3271
|
}
|
|
3270
|
-
// 获取已解决的评论,同步
|
|
3272
|
+
// 获取已解决的评论,同步 resolve 状态(在更新 review 之前)
|
|
3271
3273
|
await this.syncResolvedComments(owner, repo, prNumber, result);
|
|
3272
3274
|
// 获取评论的 reactions,同步 valid 状态(👎 标记为无效)
|
|
3273
3275
|
await this.syncReactionsToIssues(owner, repo, prNumber, result, verbose);
|
|
@@ -3724,7 +3726,7 @@ ${fileChanges || "无"}`;
|
|
|
3724
3726
|
if (prevIssues.length > 0) {
|
|
3725
3727
|
const prevFixed = prevIssues.filter((i)=>i.fixed).length;
|
|
3726
3728
|
const prevResolved = prevIssues.filter((i)=>i.resolved && !i.fixed).length;
|
|
3727
|
-
const prevInvalid = prevIssues.filter((i)=>i.valid === "false").length;
|
|
3729
|
+
const prevInvalid = prevIssues.filter((i)=>i.valid === "false" && !i.fixed && !i.resolved).length;
|
|
3728
3730
|
const prevPending = prevIssues.length - prevFixed - prevResolved - prevInvalid;
|
|
3729
3731
|
parts.push("");
|
|
3730
3732
|
parts.push(`<details><summary>📊 Round ${round - 1} 回顾 (${prevIssues.length} 个问题)</summary>\n`);
|
package/package.json
CHANGED
package/src/review.service.ts
CHANGED
|
@@ -678,6 +678,9 @@ export class ReviewService {
|
|
|
678
678
|
console.log(`📋 已有评论中存在 ${existingIssues.length} 个问题`);
|
|
679
679
|
}
|
|
680
680
|
|
|
681
|
+
// 先同步最新的 resolved 状态,确保后续 invalidate/verify 能正确跳过已解决的问题
|
|
682
|
+
await this.syncResolvedComments(owner, repo, prNumber, existingResult);
|
|
683
|
+
|
|
681
684
|
// 如果文件有变更,将该文件的历史问题标记为无效
|
|
682
685
|
// 简化策略:避免复杂的行号更新逻辑
|
|
683
686
|
const reviewConf = this.config.getPluginConfig<ReviewConfig>("review");
|
|
@@ -978,7 +981,7 @@ export class ReviewService {
|
|
|
978
981
|
const total = issues.length;
|
|
979
982
|
const fixed = issues.filter((i) => i.fixed).length;
|
|
980
983
|
const resolved = issues.filter((i) => i.resolved && !i.fixed).length;
|
|
981
|
-
const invalid = issues.filter((i) => i.valid === "false").length;
|
|
984
|
+
const invalid = issues.filter((i) => i.valid === "false" && !i.fixed && !i.resolved).length;
|
|
982
985
|
const pending = total - fixed - resolved - invalid;
|
|
983
986
|
const fixRate = total > 0 ? Math.round((fixed / total) * 100 * 10) / 10 : 0;
|
|
984
987
|
const resolveRate = total > 0 ? Math.round(((fixed + resolved) / total) * 100 * 10) / 10 : 0;
|
|
@@ -1953,7 +1956,7 @@ ${fileChanges || "无"}`;
|
|
|
1953
1956
|
}
|
|
1954
1957
|
}
|
|
1955
1958
|
|
|
1956
|
-
// 获取已解决的评论,同步
|
|
1959
|
+
// 获取已解决的评论,同步 resolve 状态(在更新 review 之前)
|
|
1957
1960
|
await this.syncResolvedComments(owner, repo, prNumber, result);
|
|
1958
1961
|
|
|
1959
1962
|
// 获取评论的 reactions,同步 valid 状态(👎 标记为无效)
|
|
@@ -2527,7 +2530,9 @@ ${fileChanges || "无"}`;
|
|
|
2527
2530
|
if (prevIssues.length > 0) {
|
|
2528
2531
|
const prevFixed = prevIssues.filter((i) => i.fixed).length;
|
|
2529
2532
|
const prevResolved = prevIssues.filter((i) => i.resolved && !i.fixed).length;
|
|
2530
|
-
const prevInvalid = prevIssues.filter(
|
|
2533
|
+
const prevInvalid = prevIssues.filter(
|
|
2534
|
+
(i) => i.valid === "false" && !i.fixed && !i.resolved,
|
|
2535
|
+
).length;
|
|
2531
2536
|
const prevPending = prevIssues.length - prevFixed - prevResolved - prevInvalid;
|
|
2532
2537
|
parts.push("");
|
|
2533
2538
|
parts.push(
|