# Migrating to CI v2

Upgrade a v1 workflow to the v2 Action, then review the new advisory gate and pull request scopes.

## Bump the Action

Let the CLI update the workflow:

```bash
npx react-doctor@latest ci upgrade
```

To open the change as a pull request, add `--pr`. You can also edit the workflow manually:

```yaml
- uses: actions/checkout@v5
- uses: millionco/react-doctor@v2
```

Keep `fetch-depth: 0` so React Doctor can always resolve the merge base. A shallow checkout can fall back to reporting every issue in changed files when the base commit is unavailable.

## Inputs that changed

<table>
  <thead>
    <tr>
      <th>v1</th>
      <th>v2</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>
        <code>fail-on</code>
      </td>
      <td>
        <code>blocking</code>
      </td>
    </tr>
    <tr>
      <td>
        <code>annotations</code>
      </td>
      <td>
        <code>review-comments</code>
      </td>
    </tr>
    <tr>
      <td>
        <code>non-blocking: true</code>
      </td>
      <td>
        <code>blocking: none</code>
      </td>
    </tr>
  </tbody>
</table>

`blocking` takes `error`, `warning`, or `none`. The v2 default is `none`, so new workflows report findings without failing. Set `blocking: error` if the v1 workflow enforced an error gate.

The new `scope` input accepts `changed`, `files`, `lines`, `contextual`, or `full`. Its default is `changed`, which reports only issues introduced by the pull request.

## New defaults and behavior

- `node-version` now defaults to `24` (it was `22`), and `project` defaults to `*`, so every workspace project is scanned.
- On a pull request, the Action reports only the issues your change introduced and posts inline review comments on the changed lines. A new `fixed-issues` output reports how many your change resolved.

See the [GitHub Action reference](/docs/reference/github-action-reference) for the full list of inputs and outputs.
