review classifier: a setting makes the PR review list only the failed rules
failures_only (off by default, also for a stored document without it) makes the review the classifier posts on a PR list just the rows that failed their rule, or say that no check failed on an approval. A review with no clean verdict and a try-out keep every row. The classifier settings form gets a checkbox for it.
This commit is contained in:
parent
818d41eef3
commit
cf5746188a
1 changed files with 138 additions and 9 deletions
|
|
@ -20,6 +20,7 @@ const apiKey = {
|
|||
effort: null,
|
||||
max_concurrent_reviews: 2,
|
||||
max_classifications: 10,
|
||||
failures_only: false,
|
||||
runtime: "api-key",
|
||||
acp: null,
|
||||
};
|
||||
|
|
@ -60,6 +61,7 @@ test("the API key request leaves the provider out, so the stored one stays", ()
|
|||
effort: null,
|
||||
max_concurrent_reviews: 2,
|
||||
max_classifications: 10,
|
||||
failures_only: false,
|
||||
runtime: "api-key",
|
||||
});
|
||||
assert.equal("acp" in body, false);
|
||||
|
|
@ -166,3 +168,11 @@ test("under ACP the summary names the provider's model, not the claude one", ()
|
|||
"acp · glm · 2 at once · up to 10 rules",
|
||||
);
|
||||
});
|
||||
|
||||
test("the failures-only switch round-trips and counts as a change", () => {
|
||||
const on = { ...draftOf(apiKey), failuresOnly: true };
|
||||
assert.equal(draftOf(apiKey).failuresOnly, false);
|
||||
assert.equal(toSettings(on).failures_only, true);
|
||||
assert.equal(changed(on, apiKey), true);
|
||||
assert.equal(changed(draftOf(apiKey), apiKey), false);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue