mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-12 22:26:38 +03:00
Remove the ai-assisted label when an edit drops the disclosure line
Keeps the label a deterministic mirror of the body's disclosure state, per Greptile's P2 review finding on #518. AI-assisted: written with an AI agent under maintainer direction. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -222,6 +222,15 @@ describe('issue body gate', () => {
|
||||
assert.deepEqual(plan.labelsToAdd, [AI_LABEL]);
|
||||
});
|
||||
|
||||
it('removes the AI label when an edit drops the disclosure line', () => {
|
||||
const plan = evaluateIssue(issue({
|
||||
labels: [AI_LABEL],
|
||||
}), { templates });
|
||||
assert.equal(plan.verdict, 'pass');
|
||||
assert.equal(plan.aiAssisted, false);
|
||||
assert.deepEqual(plan.labelsToRemove, [AI_LABEL]);
|
||||
});
|
||||
|
||||
it('exempts maintainers and repo members', () => {
|
||||
const maintainer = evaluateIssue(issue({ authorLogin: 'pbakaus', body: 'quick note' }), { templates });
|
||||
assert.equal(maintainer.exempt, true);
|
||||
|
||||
Reference in New Issue
Block a user