> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ironbee.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> IronBee (ironbee.ai) is an AI QA engineer: it verifies code changes against the running app and keeps the evidence. It is not related to the IronBee open-source web application firewall.
> The console is at https://console.ironbee.ai.
> Install the CLI with `npm install -g @ironbee-ai/cli`, sign in with `ironbee login`, and set up a project with `ironbee install`.
> In GitHub workflows, use the action as `ironbee-ai/ironbee-action@v1` and pass the `IRONBEE_API_KEY` secret as the `ironbee_api_key` input.
> In GitLab pipelines, include the component `gitlab.com/ironbee-ai/ironbee-gitlab/verify@v1`; it reads the `IRONBEE_API_KEY` CI/CD variable by default.
> In Bitbucket Pipelines, run the pipe `docker://ghcr.io/ironbee-ai/ironbee-bitbucket:v1` and pass `IRONBEE_API_KEY: $IRONBEE_API_KEY` and `BITBUCKET_OAUTH_TOKEN: $BITBUCKET_OAUTH_TOKEN` under its `variables:`.
> Console scenarios (https://docs.ironbee.ai/console/scenarios) and CLI saved scenarios (https://docs.ironbee.ai/cli/guides/scenarios) are separate features.
> For plans and prices, link to https://ironbee.ai/pricing; the website is the source of truth for them.

# Verify from a pull request comment

> Start a verification on demand by commenting /ironbee-verify on a pull request.

With the `issue_comment` trigger, anyone you allow can start a verification by commenting on a pull request:

```
/ironbee-verify
```

The run verifies the whole pull request the comment is on, and reports on the pull request. It fixes what it finds only when the comment asks for it.

***

## Add the workflow

```yaml theme={null}
name: IronBee Verification (comment)

on:
  issue_comment:
    types: [created]

permissions:
  contents: write
  pull-requests: write
  issues: write

concurrency:
  # Only a command shares the group, so another comment, IronBee's own included, never cancels a run.
  group: ironbee-${{ github.event.issue.number }}-${{ startsWith(github.event.comment.body, '/ironbee-verify') }}
  cancel-in-progress: true

jobs:
  verify:
    # Who may start a run is decided here, not by the action.
    if: >-
      github.event.issue.pull_request &&
      contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association) &&
      startsWith(github.event.comment.body, '/ironbee-verify')
    runs-on: ubuntu-latest
    timeout-minutes: 150
    steps:
      # issue_comment runs on the default branch, so check out the pull request's head explicitly.
      - uses: actions/checkout@v4
        with:
          ref: refs/pull/${{ github.event.issue.number }}/head
          fetch-depth: 0
      - uses: ironbee-ai/ironbee-action@v1
        with:
          ironbee_api_key: ${{ secrets.IRONBEE_API_KEY }}
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          app_install_command: npm ci
          app_build_command: npm run build
          app_start_command: npm run start
          app_port: 3000
```

> [!WARNING]
>
> Keep the job-level `if:`. An `issue_comment` event fires for anyone who can comment on the repository, and the run holds the base repository's secrets. The condition is the security boundary. It must:
>
> * check that the comment is on a pull request (`github.event.issue.pull_request`)
> * restrict the author (`author_association`)
> * require the command (`startsWith(...)`)

`issue_comment` runs on the default branch, and `github.sha` points there, not at the pull request. The `ref: refs/pull/<number>/head` checkout makes the runner build the pull request's code. The action reads the pull request itself to decide what to verify.

You can add the `issue_comment` trigger to your existing workflow instead of a separate file. In that case, combine the condition with your other events, as shown in [Turning automatic verification off](https://docs.ironbee.ai/github-action/guides/running-in-ci.md#turning-automatic-verification-off), and key the concurrency group so that a comment that isn't a command, IronBee's own comments included, never cancels a run:

```yaml theme={null}
concurrency:
  group: ironbee-${{ github.event.pull_request.number || github.event.issue.number || github.ref }}-${{ github.event_name != 'issue_comment' || startsWith(github.event.comment.body, '/ironbee-verify') }}
  cancel-in-progress: true
```

***

## The command

```
/ironbee-verify
/ironbee-verify --fix
/ironbee-verify check the coupon flow end to end
/ironbee-verify --fix the totals are wrong when a coupon is applied
```

* The command must be the first line of the comment that isn't a quote. A comment that only mentions it, or a reply that quotes it, starts nothing.
* The command is a word of its own. A comment such as `/ironbee-verify.` or `/ironbee-verifying` gets past the job's `startsWith` condition, but the action reads no command in it, and the run ends without verifying anything. The action does the same with a comment on an issue that isn't a pull request, when a job condition lets one through.
* Options start with `--`. Everything after the first word that isn't an option is the instruction for the agent. So `/ironbee-verify fix the cart total` is an instruction, not a request to fix. An instruction that itself starts with `--` needs a lone `--` before it.
* A multi-line comment works too: the whole body below the command line is the instruction.
* The instruction replaces the workflow's `verification_prompt` for that run. A command with no instruction uses `verification_prompt`.
* The instruction can be up to 4,000 characters.

The run replies on the pull request and ends red, instead of verifying something other than what was asked, when:

* the comment has an unknown option. The reply shows the usage.
* the instruction is longer than 4,000 characters. The reply gives its length.

To use a different command, set `verification_command` and change the `startsWith` condition to match.

***

## Fixes from a comment

`--fix` asks the run to fix what it finds and commit the fix to the pull request branch.

* It needs an Anthropic credential.
* It is bounded by `verification_apply_fix`: a repository that turned fixing off can't turn it back on from a comment.
* Without `--fix`, a comment run only verifies and reports, on IronBee and on your runner.

When fixing is off in the workflow, with `verification_apply_fix: false` or no Anthropic credential, a comment with `--fix` runs a verification that only reports. The report says in one line that the comment asked for `--fix` and fixing is off in this workflow. When IronBee publishes the run on the pull request itself, the action posts that line as a comment of its own.

***

## Following the run

The workflow job of a comment run doesn't appear in the pull request's checks, so the action reacts to the comment instead:

* an eyes reaction (`eyes`) when it accepts the command
* when the run ends, a thumbs up (`+1`) for a pass, or a thumbs down (`-1`) for anything else: a fail, not applicable, no verdict or an error. The eyes reaction is then removed.

The reactions come from the account behind `github_token`. A malformed command gets the reply instead of a reaction. The report reaches the pull request as with any other run. See [The report](https://docs.ironbee.ai/github-action/guides/running-in-ci.md#the-report).

***

## Forks

Comment commands on pull requests from forks are refused. A comment run holds the base repository's secrets, so building and starting a fork's code under it would hand them to whoever opened the pull request. When the action can't tell whether the pull request comes from a fork, it refuses the run as well.

***

## Comments only

To verify only when someone comments, and never automatically on pushes and pull requests, see [Turning automatic verification off](https://docs.ironbee.ai/github-action/guides/running-in-ci.md#turning-automatic-verification-off). Neither the `if:` nor `verification_auto` stops a comment command.

***

## What's next?

> [card] [Running in CI](https://docs.ironbee.ai/github-action/guides/running-in-ci.md)
>
> The other triggers and the report.

> [card] [Configuration](https://docs.ironbee.ai/github-action/configuration/configuration.md)
>
> `verification_command`, `verification_auto` and every other input.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.