@spaceflow/review 0.74.0 → 0.76.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 +11 -9
- package/package.json +2 -2
- package/src/review.service.ts +11 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.75.0](https://github.com/Lydanne/spaceflow/compare/@spaceflow/review@0.74.0...@spaceflow/review@0.75.0) (2026-04-03)
|
|
4
|
+
|
|
5
|
+
### 修复BUG
|
|
6
|
+
|
|
7
|
+
* **gitea:** 修正 PR review 事件类型映射 ([0b86fac](https://github.com/Lydanne/spaceflow/commit/0b86facc6df50eb1fd278d72090c329b5a5aaccf))
|
|
8
|
+
|
|
9
|
+
### 其他修改
|
|
10
|
+
|
|
11
|
+
* **core:** released version 0.29.0 [no ci] ([26c7af1](https://github.com/Lydanne/spaceflow/commit/26c7af16384cdfb30aa82d2a84385989e5b1cce8))
|
|
12
|
+
* **publish:** released version 0.53.0 [no ci] ([72a98c0](https://github.com/Lydanne/spaceflow/commit/72a98c0d2dfd87c9319c1c73e0f8754b320013cd))
|
|
13
|
+
* **review-summary:** released version 0.43.0 [no ci] ([02d8232](https://github.com/Lydanne/spaceflow/commit/02d8232e28b8c1f0f1a53ffc8b43638ab9a0b3ba))
|
|
14
|
+
|
|
15
|
+
## [0.74.0](https://github.com/Lydanne/spaceflow/compare/@spaceflow/review@0.73.0...@spaceflow/review@0.74.0) (2026-04-03)
|
|
16
|
+
|
|
17
|
+
### 修复BUG
|
|
18
|
+
|
|
19
|
+
* **review:** 修正无需审查文件时的轮次计算 ([0ee902e](https://github.com/Lydanne/spaceflow/commit/0ee902e6d3a4b2c09efa99d86b3aca4806508fb1))
|
|
20
|
+
|
|
21
|
+
### 其他修改
|
|
22
|
+
|
|
23
|
+
* **review-summary:** released version 0.42.0 [no ci] ([6e397e5](https://github.com/Lydanne/spaceflow/commit/6e397e5d389c385142d52b29b0332130be5245cd))
|
|
24
|
+
|
|
3
25
|
## [0.73.0](https://github.com/Lydanne/spaceflow/compare/@spaceflow/review@0.72.0...@spaceflow/review@0.73.0) (2026-04-03)
|
|
4
26
|
|
|
5
27
|
### 修复BUG
|
package/dist/index.js
CHANGED
|
@@ -2280,14 +2280,16 @@ class ReviewService {
|
|
|
2280
2280
|
}
|
|
2281
2281
|
throw new Error("必须指定 PR 编号或者 base/head 分支");
|
|
2282
2282
|
}
|
|
2283
|
-
// 0. 过滤掉 merge commit(消息以 "Merge branch" 开头的 commit)
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2283
|
+
// 0. 过滤掉 merge commit(消息以 "Merge branch" 或 "Merge pull request" 开头的 commit)
|
|
2284
|
+
{
|
|
2285
|
+
const beforeMergeFilterCount = commits.length;
|
|
2286
|
+
commits = commits.filter((c)=>{
|
|
2287
|
+
const message = c.commit?.message || "";
|
|
2288
|
+
return !message.startsWith("Merge ");
|
|
2289
|
+
});
|
|
2290
|
+
if (beforeMergeFilterCount !== commits.length && shouldLog(verbose, 1)) {
|
|
2291
|
+
console.log(` 跳过 Merge Commits: ${beforeMergeFilterCount} -> ${commits.length} 个`);
|
|
2292
|
+
}
|
|
2291
2293
|
}
|
|
2292
2294
|
// 1. 按指定的 files 过滤
|
|
2293
2295
|
if (files && files.length > 0) {
|
|
@@ -2433,7 +2435,7 @@ class ReviewService {
|
|
|
2433
2435
|
console.log(` 应用规则存在性过滤后: ${filteredIssues.length} 个问题`);
|
|
2434
2436
|
}
|
|
2435
2437
|
filteredIssues = this.reviewSpecService.filterIssuesByOverrides(filteredIssues, applicableSpecs, verbose);
|
|
2436
|
-
// 过滤掉不属于本次 PR commits
|
|
2438
|
+
// 过滤掉不属于本次 PR commits 的问题(merge commits 已在步骤 0 中移除)
|
|
2437
2439
|
if (shouldLog(verbose, 3)) {
|
|
2438
2440
|
console.log(` 🔍 变更行过滤条件检查:`);
|
|
2439
2441
|
console.log(` showAll=${context.showAll}, isDirectFileMode=${isDirectFileMode}, commits.length=${commits.length}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spaceflow/review",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.76.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
|
@@ -623,14 +623,16 @@ export class ReviewService {
|
|
|
623
623
|
throw new Error("必须指定 PR 编号或者 base/head 分支");
|
|
624
624
|
}
|
|
625
625
|
|
|
626
|
-
// 0. 过滤掉 merge commit(消息以 "Merge branch" 开头的 commit)
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
626
|
+
// 0. 过滤掉 merge commit(消息以 "Merge branch" 或 "Merge pull request" 开头的 commit)
|
|
627
|
+
{
|
|
628
|
+
const beforeMergeFilterCount = commits.length;
|
|
629
|
+
commits = commits.filter((c) => {
|
|
630
|
+
const message = c.commit?.message || "";
|
|
631
|
+
return !message.startsWith("Merge ");
|
|
632
|
+
});
|
|
633
|
+
if (beforeMergeFilterCount !== commits.length && shouldLog(verbose, 1)) {
|
|
634
|
+
console.log(` 跳过 Merge Commits: ${beforeMergeFilterCount} -> ${commits.length} 个`);
|
|
635
|
+
}
|
|
634
636
|
}
|
|
635
637
|
|
|
636
638
|
// 1. 按指定的 files 过滤
|
|
@@ -822,7 +824,7 @@ export class ReviewService {
|
|
|
822
824
|
verbose,
|
|
823
825
|
);
|
|
824
826
|
|
|
825
|
-
// 过滤掉不属于本次 PR commits
|
|
827
|
+
// 过滤掉不属于本次 PR commits 的问题(merge commits 已在步骤 0 中移除)
|
|
826
828
|
if (shouldLog(verbose, 3)) {
|
|
827
829
|
console.log(` 🔍 变更行过滤条件检查:`);
|
|
828
830
|
console.log(
|