fix(github): give an e2e explore run its own pull request comment
Merged
OK
18d ago+62+62+01234567890123456789-4-4-0123456789
A job that runs e2e run and then e2e explore with the github() reporter loses its test results comment: both runs derive the same marker (project, workflow, job, key), so the exploration's page replaces the tests' page.
packages/github/src/reporter.ts: an exploration's marker gainskind=explore. A test run's marker is unchanged, so comments already on open pull requests are still found and updated.packages/github/src/merge.ts:foldLastRunignores a run before that was an exploration, so a--last-failedrerun never folds an exploration's result into the test comment.docs/github.mdxgets an "Explorations" section: givee2e exploreits own--outputin a shared job, since it otherwise replaces the test run'sresults/and the test comment's evidence links break.- Changeset notes the one transition cost: an exploration comment posted by an older version stops updating.
Verified
Ran it locally: yes
- testbed bug garden with a scratch config using the built
github()reporter, GitHub Actions env vars set, andGITHUB_API_URLpointed at a local fake GitHub API that logs every comment write. Sequence:e2e run,e2e explore --max-steps 1, then both again.
| main | this branch |
|---|---|
POST 1 project=dev.e2e.verify workflow=e2e job=test 路 馃煝 e2e: 1 passed | POST 1 project=dev.e2e.verify workflow=e2e job=test 路 馃煝 e2e: 1 passed |
PATCH 1 project=dev.e2e.verify workflow=e2e job=test 路 馃敶 e2e explore: 1 issue (tests comment overwritten) | POST 2 ... job=test kind=explore 路 馃敶 e2e explore: 1 issue |
rerun: PATCH 1 tests, PATCH 2 explore, each in place |
Nothing was posted to a real pull request.