Repository navigation
test(bundle): drive /test and lgtm cancel (/lgtm cancel, /remove-lgtm) through dist/index.js - #240
Merged
github-actions[bot] merged 1 commit intoOct 2, 2026
Conversation
…) through dist/index.js Adds __tests__/bundle/triggerTestAndLgtmCancel.test.ts, a new file that reuses fakeGithub.ts and runBundle.ts to spawn the committed bundle for the two issue_comment paths the e2e suite never exercised: - /test: run table for no argument and ?, all, name and file matching, the no-match comment, 409 already-re-running, 403 actions: write refusal, non-member refusal, and the non-pull-request comment. - lgtm cancel: /lgtm cancel by a reviewer and /remove-lgtm by the author remove the label and reset prow/lgtm to pending; no label is a no-op; a non-reviewer non-author is refused. Closes #239 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 automatically remove the |
This was referenced Sep 30, 2026
Member
|
/kind cleanup |
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
__tests__/bundle/triggerTestAndLgtmCancel.test.ts— a new file only. It reusesfakeGithub.tsandrunBundle.tsto spawn the committeddist/index.jsand drives the twoissue_commentpaths the bundle e2e suite never exercised: the/testtrigger command (src/issueComment/trigger.tstest()) and lgtm cancel (src/labels/lgtm.tscancelLgtm()via/lgtm canceland/remove-lgtm, plusunbindLgtminsrc/plugins/lgtmBinding.ts).14 cases, one
describeper path:GITHUB_WORKFLOW=Prowso the Prow run is filtered out of every listing and re-run)?→ one comment with the run table (CI,Lint,E2E; no Prow), no re-runall→POST actions/runs/1/rerun,POST actions/runs/2/rerun(the two completed runs), rocket reaction, no comment, no sweepLINT(name, case-insensitive) → re-runs 2 only;ci(file stem ofci.yml) → re-runs 1 onlye2e(in progress only) →No completed GitHub Actions workflow run on \headsha` matches `e2e`.` + table, no re-run… are already being re-run.comment, no rocket, exit 0::error::cannot re-run workflows: grant \actions: write` to the workflow`, exit 1Cannot /test because Error: stranger is not a org member or collaborator, exit 1, runs never read`/test` only applies to pull requests.as the only API call/lgtm cancelby a reviewer on an lgtm'd pr → owners + membership reads,GET issues/1,DELETE issues/1/labels/lgtm, configuration reads,POST statuses/headsha{state: 'pending', context: 'prow/lgtm', description: 'lgtm cancelled by Codertocat'}, then tide's sweep reads the pr, the OWNERS probe and the queue state and logsskipping pr #1: missing lgtm; no merge/remove-lgtmby the pr author → no/orgs/or/collaborators/read; the label removed, the pr and its OWNERS context read for the head, the status reset, then the sweep/lgtm cancelwith nolgtmlabel → noDELETE, no status write/lgtm cancelby a non-reviewer non-author → refused, exit 1, nothing removed, no status writeVerified on
main@ c48bd6d:npx vitest run __tests__/bundle→ 2 files / 102 tests pass (88 existing + 14 new)npx eslint __tests__/bundle/triggerTestAndLgtmCancel.test.tscleanAll files 99.83 | 98.35 | 100 | 99.82); this adds e2e coverage onlyDisjoint from every open hold-gated PR: #236 edits one line of
bundle.test.ts, #238 addscollaborationCommands.test.ts(/cc /uncc /unassign /retitle /lock /reopen); none of #217, #219, #221, #223, #225, #227, #229, #230, #232, #234 touch__tests__/bundle/. This PR creates one new file and edits nothing existing.Related Issue
Closes #239
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88