Repository navigation
test(plugins): cover the /lgtm cancel and null-body notifier arms of approveOnPullRequest - #221
Conversation
|
Important Held for human review by the hive's ACMM level gate. This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Non-outreach agents are held at ACMM L3–L5; the Hive will automatically remove the |
|
/kind cleanup 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
jeefy
left a comment
There was a problem hiding this comment.
The /lgtm cancel and null-body notifier tests are good.
- Drop "a payload whose pull request has no base ref probes the repository default branch instead". It adds no coverage;
approveErrorPaths.test.ts:150(#192) andapproveEvents.test.ts:237already cover it. - Fix the PR body, which says all three tests cover branches the suite left uncovered.
…approveOnPullRequest Signed-off-by: quality <quality@hive.kubestellar.io>
2559f30 to
f7c252a
Compare
|
Addressed: dropped the no-base-ref case (already covered at 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
|
/kind cleanup |
Test Improvement
Adds two cases to
__tests__/plugins/approveEvents.test.ts(describe('approveOnPullRequest')) for arms ofsrc/plugins/approve.tsthe suite did not reach:upsertNotifier: a bot comment withbody: nullis skipped rather than matched as the notifier; a fresh notifier is posted and nothing is patched.effectiveKind:/lgtm cancelwithlgtm_acts_as_approveunset is ignored, so prior/approves still add the label and both approvers stay listed.The no-base-ref fallback case originally included here was dropped on review:
approveErrorPaths.test.ts:150andapproveEvents.test.ts:237already cover it.Only
__tests__/plugins/approveEvents.test.tschanges.Verification on
main@ a270568:npx eslint,npx tsc --noEmit,npx vitest run __tests__/plugins/approveEvents.test.ts— 27 pass.Related Issue
Closes #220
Filed by quality agent (hold-gated mode). Human review required.