@spaceflow/review 0.76.0 → 0.77.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 +12 -0
- package/dist/index.js +2654 -1872
- package/package.json +2 -2
- package/src/deletion-impact.service.ts +4 -2
- package/src/index.ts +34 -2
- package/src/locales/en/review.json +2 -1
- package/src/locales/zh-cn/review.json +2 -1
- package/src/pull-request-model.ts +236 -0
- package/src/review-context.ts +409 -0
- package/src/review-includes-filter.spec.ts +248 -0
- package/src/review-includes-filter.ts +144 -0
- package/src/review-issue-filter.ts +523 -0
- package/src/review-llm.ts +634 -0
- package/src/review-pr-comment-utils.ts +186 -0
- package/src/review-result-model.spec.ts +657 -0
- package/src/review-result-model.ts +1024 -0
- package/src/review-spec/types.ts +2 -0
- package/src/review.config.ts +9 -0
- package/src/review.service.spec.ts +93 -1626
- package/src/review.service.ts +531 -2765
- package/src/types/review-llm.ts +19 -0
- package/src/utils/review-llm.ts +32 -0
- package/tsconfig.json +1 -1
package/src/review-spec/types.ts
CHANGED
package/src/review.config.ts
CHANGED
|
@@ -91,6 +91,14 @@ export interface ReviewOptions {
|
|
|
91
91
|
* - false: 不自动批准(默认)
|
|
92
92
|
*/
|
|
93
93
|
autoApprove?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* 存在未解决问题时以非零退出码退出(工作流抛出异常)
|
|
96
|
+
* - 'off': 禁用(默认),即使有问题也正常退出
|
|
97
|
+
* - 'warn': 有未解决的 warn 级别问题时抛出异常
|
|
98
|
+
* - 'error': 有未解决的 error 级别问题时抛出异常
|
|
99
|
+
* - 'warn+error': 有未解决的 warn 或 error 级别问题时抛出异常
|
|
100
|
+
*/
|
|
101
|
+
failOnIssues?: "off" | "warn" | "error" | "warn+error";
|
|
94
102
|
}
|
|
95
103
|
|
|
96
104
|
/** review 命令配置 schema(LLM 敏感配置由系统 llm.config.ts 管理) */
|
|
@@ -114,6 +122,7 @@ export const reviewSchema = () =>
|
|
|
114
122
|
invalidateChangedFiles: invalidateChangedFilesSchema.default("invalidate").optional(),
|
|
115
123
|
skipDuplicateWorkflow: z.boolean().default(false).optional(),
|
|
116
124
|
autoApprove: z.boolean().default(false).optional(),
|
|
125
|
+
failOnIssues: z.enum(["off", "warn", "error", "warn+error"]).default("off").optional(),
|
|
117
126
|
});
|
|
118
127
|
|
|
119
128
|
/** review 配置类型(从 schema 推导) */
|