fix(tasks): honor explicit prohibitions on running engineering checks
This commit is contained in:
@@ -19,7 +19,7 @@ export function taskContract(task, lookup = () => null) {
|
||||
original = previous;
|
||||
}
|
||||
const goal = original.contract?.goal ?? original.goal;
|
||||
const skip = /无需(?:任何)?测试|不(?:需要|用|要)(?:进行|做|运行)?测试|\b(?:no tests?(?: needed|required)?|without (?:running )?tests?)\b/i.test(goal);
|
||||
const skip = /无需(?:任何)?(?:测试|工程检查)|不(?:需要|用|要)?(?:进行|做|运行|执行)?(?:任何)?(?:测试|工程检查)|\b(?:no (?:tests?|checks?)(?: needed|required)?|without (?:running )?(?:tests?|checks?)|(?:do not|don't|never) (?:run|execute) (?:tests?|checks?))\b/i.test(goal);
|
||||
const required = !skip && /(?:运行|执行|通过|修复|补充|添加).{0,12}(?:测试|工程检查)|\b(?:run|pass|fix|add)\b.{0,24}\b(?:tests?|checks?)\b/i.test(goal);
|
||||
const file = hasFileDeliveryRequest(goal);
|
||||
return { schemaVersion: 1, goal, kind: file ? 'file' : 'general', checks: skip ? 'skip' : required ? 'required' : 'unspecified',
|
||||
|
||||
Reference in New Issue
Block a user