How to Gate AI-Written Pull Requests in GitHub Actions and GitLab CI A developer documented a CI release-gate pattern that queries the AI CodeOps release-check API to block AI-authored pull requests before merge. The GitHub Actions and GitLab CI jobs trigger only on branches named codeops/run-, post the PR or MR URL to the endpoint, print the summary and reasons, and fail the job unless the response's allowed field is true, with optional gates on coverage floor, required workflows, disallowed SBOM licenses, and prior staging deploys. AI coding agents open pull requests faster than teams can review them. Branch protection helps, but a green CI run only tells you the build passed. It doesn't tell you whether the change was reviewed, whether serious findings are still open, or whether the tests ran on the version you're about to merge. This tutorial adds one required check to your pipeline. It asks the AI CodeOps release gate whether a pull request may ship, prints the reasons, and fails the job when the answer is no. The release gate looks at every AI CodeOps session that touched the change and applies the same rules as the console: You can make it stricter per pipeline: a coverage floor, required workflows, disallowed licenses from the project's SBOM, or a requirement that the change already deployed to an environment such as staging. Two details matter for CI: allowed field, not the status code. allowed: false with the summary "Evaluation failed". A change with no matching sessions is also denied. In the console, open Configure → API Keys and create a key. The secret starts with sk- and is shown once. The key acts as the member who created it, so create it from an account whose role can read the workspace. Store it as a CI secret named AICODEOPS API KEY . AI CodeOps opens its pull requests on branches named codeops/run-