Check run on each pull request
When HeyBug tests a pull request, it adds one check to that pull request's latest commit.
When HeyBug tests a pull request, it adds one check to that pull request's latest commit. The check is named HeyBug / tests. It shows in progress while the run goes, then ends as success, failure or neutral. HeyBug also keeps one comment on the pull request with the counts and each failure. It edits that comment when the run ends and never posts a second one for the same pull request and run.
The three conclusions
| Run result | Check conclusion | What it means |
|---|---|---|
| Every test passed | success | Nothing failed. |
| A test failed, or the run hit an error | failure | A case failed. An error means the browser or network broke outside your app, so run it again. |
| The run was canceled | neutral | Someone stopped the run before it finished. |
The check's summary has the counts (passed, failed, blocked). For each failing case it gives the failing step, what was expected and what the browser saw. The comment lists up to 25 failures; the rest are on the run page. The check's details link opens the run page.
The comment looks like this (placeholder values):
HeyBug tested `9f3c2a1`: **2 passed, 1 failed, 0 blocked**. Open the run
| Passed | Failed | Blocked |
| 2 | 1 | 0 |
### Failures
- **Apply a coupon** failed at step 3 (Click Apply). Expected: the total drops. Actual: the button stays disabled.Before you start
- Install the app. Open Integrations (
/settings/integrations) and choose Install app. Owners and admins can do this. The install link comes fromPOST /api/github/install-link. - Link a repository to a project. On the same page, link the repository you want to test. The API is
PUT /api/github/repos/{repoId}/project. - Turn on pull request runs. Owners and admins set the project's PR trigger settings (below).
Steps
- Install the app and link the repository, as above.
- Turn on pull request runs with
PUT /api/projects/{projectId}/pr-triggers. This call replaces the wholeprTriggersobject, so send every field you want kept. - Open or update a pull request into the base branch you set. An empty
baseBranchmeans any branch. - The check appears as
HeyBug / testsand shows in progress. Open its details link to follow the run. - When the run finishes, the check gets its conclusion and the comment is Updated in place.
- To block merges, set
blockPrtotrue. The comment then gets a footer. Next, in your Git host's branch protection rules for the base branch, markHeyBug / testsas a required check. The footer explains this, but only branch protection enforces it. The check name appears in the branch protection list only after the check has run once.
Example
Turn on pull request runs and block merges on failure for project $PROJECT_ID:
export HEYBUG_SERVER=https://opentest.nagara.cloud
export HEYBUG_TOKEN=<token of an owner or admin>
curl -sS -X PUT "$HEYBUG_SERVER/api/projects/$PROJECT_ID/pr-triggers" \
-H "Authorization: Bearer $HEYBUG_TOKEN" \
-H "Content-Type: application/json" \
-d '{"enabled":true,"includeDrafts":false,"blockPr":true,"baseBranch":"main","signal":"deployment_status"}'The response is the saved settings. Send the same path with GET to read them back. signal must be one of deployment_status, check_suite, workflow_run, bot_comment or push.
When a check fails, ask your assistant over MCP: "Get run r_9 and wait for it." It calls heybug_get_run, which returns the verdict and each failed case. The run id is in the check's details link.
When it fails
- No check appears. Work through the four items in Before you start. Also confirm the pull request targets the base branch you set. Only runs started by a pull request get a check. Runs you start by hand or from the CLI do not.
- The check stays in progress. The run has not finished. Open the details link. A queued or running run is still going. If the run page shows a result but the check has not changed, reload after a moment. The update happens in the background, and the comment is never posted twice.
- The check failed. Open the comment's failure list or the run page. Each failing case shows the failing step, Expected and Actual. Fix the app or the test plan and push. The next pull request run gets its own check.
- The check failed with an error. An error means the browser or network broke outside your app. Run it again before you change anything.
- The check is neutral. The run was canceled. Push a new commit to start the next pull request run.
- Merges are not blocked.
blockPronly adds the footer to the comment. MarkHeyBug / testsas required in branch protection for the base branch.
See also CI for the CI workflow and MCP for the assistant tools.