accessiBe Help Center

How to prevent merging when Code Agent PR checks fail

  • Updated

Blocking issue level, configured in your .codeagent.yml file, determines which issues cause the PR scan check run to fail. To prevent merging when the check fails, make it required in GitHub.

To prevent merging when the PR scan check fails

  1. In your repository, go to Settings > Rules > Rulesets.
  2. Select New ruleset > New branch ruleset.
  3. Set Enforcement status to Active.
  4. Under Target branches, select the branch pattern to protect (typically main or default).
  5. Scroll to Rules and check Require status checks to pass.
  6. Select Add checks, then search for and select codeAgent Review.

    Note: The check appears in the dropdown after it runs on a PR in this repository at least once. If it isn’t listed, enter its exact name and add it manually. The name must match the check run exactly. To confirm it, open the Checks tab on a recent PR.

  7. Select Save changes.

It's recommended to turn on Require branches to be up to date before merging to force a re-run against the latest base branch.

Required app permissions: Pull requests: Read & Write, Checks: Read & Write.

 

Was this article helpful?

0 out of 0 found this helpful