✨ feat(vscode): 审查通过写入工单状态并在卡片上区分
This commit is contained in:
1 parent
ac1b7ed641
commit
177e75910e
21 files changed
+203
-10
No files matched your search
@@ -425,6 +425,7 @@ var knownStateFields = map[string]struct{}{
|
||||
"implementStatus": {},
|
||||
"color": {},
|
||||
"autoReview": {},
|
||||
"reviewPassed": {},
|
||||
"handoffAttachmentId": {},
|
||||
"handoffFrom": {},
|
||||
"handoffRequestFrom": {},
|
||||
|
||||
@@ -118,6 +118,10 @@
|
||||
"type": "boolean",
|
||||
"description": "本工单是否启用自动审查(覆盖全局 autoReview 设置)。"
|
||||
},
|
||||
"reviewPassed": {
|
||||
"type": "boolean",
|
||||
"description": "最近一次审查是否认为可以过。true 表示通过;false 或不写表示还在审,或审出了必须改的问题。PR 有新提交时合并成 false。不改变看板列。"
|
||||
},
|
||||
"handoffAttachmentId": {
|
||||
"type": "string",
|
||||
"description": "移交会话包在 Gitea 的附件 id;存在即「待接管」,接管完成后清空;清空时写空串。"
|
||||
|
||||
@@ -87,13 +87,23 @@ func TestValidateAcceptsFullState(t *testing.T) {
|
||||
"worktreePath":"/home/x/Sources/worktree/proj/slug",
|
||||
"implementStatus":"done",
|
||||
"color":"terminal.ansiBlue",
|
||||
"autoReview":true
|
||||
"autoReview":true,
|
||||
"reviewPassed":true
|
||||
}`
|
||||
if err := Validate([]byte(full)); err != nil {
|
||||
t.Fatalf("完整合法 state 应当通过校验,得到: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestValidateAcceptsReviewPassed(t *testing.T) {
|
||||
if err := Validate([]byte(`{"reviewPassed":true}`)); err != nil {
|
||||
t.Fatalf("reviewPassed=true 应当通过校验,得到: %v", err)
|
||||
}
|
||||
if err := Validate([]byte(`{"reviewPassed":false}`)); err != nil {
|
||||
t.Fatalf("reviewPassed=false 应当通过校验,得到: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestValidateRejectsBadPrototypeFile(t *testing.T) {
|
||||
err := Validate([]byte(`{"prototypeFile":"docs/prototype/login/figma-plugin/manifest.md"}`))
|
||||
if err == nil {
|
||||
|
||||
Reference in new issue
Block a user