Repository navigation
test(bundle): drive /approve cancel on a repository without OWNERS files through dist/index.js - #276
Merged
github-actions[bot] merged 1 commit intoOct 3, 2026
Conversation
…les through dist/index.js The legacy no-OWNERS path of src/issueComment/approve.ts (list reviews, dismiss the bot's latest APPROVED one) was only reached by unit mocks. One bundle case now runs it against the fake API and asserts the single dismissal of the last bot APPROVED review, its message, and that no review, label or comment is written. Signed-off-by: quality <quality@hive.kubestellar.io>
Contributor
Author
|
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 keep the |
Contributor
Author
|
/kind cleanup 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
Member
|
/kind cleanup |
This was referenced Oct 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test Improvement
Adds one case to
__tests__/bundle/bundle.test.ts, in theissue_comment /approve on a pull requestdescribe beside the existing no-OWNERS/approvetest (+34 lines, no helper copies — reusesrouteOwners,runApprove,bot,membershipReads,expectCommandThenConfig):/approve cancelbybobon a repository with no OWNERS files, with aGET …/pulls/1/reviewslist holding two botAPPROVEDreviews, a humanAPPROVEDreview and a botDISMISSEDone.PUT …/pulls/1/reviews/12/dismissals(the last botAPPROVEDreview, not the human's or the dismissed one) with body{ message: 'Canceled through prow-github-actions by @bob' }; noPOST …/reviews, no label delete, no comment; exit 0, no::error::; request sequenceownersReads → membership(bob) → GET reviews → PUT dismissal, then the post-command sweep's config/pr reads.Files/functions claimed:
__tests__/bundle/bundle.test.ts(issue_comment /approve on a pull requestdescribe) only; production pathsrc/issueComment/approve.tscancel()+ theisCancelarm of the no-OWNERS branch. Disjoint from #221 (unit,src/plugins/approve.ts), #263 (approve.github_review, OWNERS repositories) and the other held bundle PRs.Evidence: with #274's
test:coverage:e2eharness onmain@ a270568,src/issueComment/approve.tsunreached statement lines go from44,63,64,67,69,82,96,131,150,153,154,160,165,166,167,168,172,173,176,177,185to44,67,82,96,131,160,173,185(onlythrow/catcharms remain).npx vitest run __tests__/bundle/bundle.test.ts→ 89 passed;npx eslint __tests__/bundle/bundle.test.tsclean.Related Issue
Closes #275
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88