Skip to main content
For most teams, automated Code Review is the simplest way to run reviews and risk assessments. Simply enable it, and Unblocked runs reviews and risk assessments on every change and posts the results to your pull requests. Use the Code Review APIs to run reviews and assess pull request risk at the points you choose in your software development workflow. You control when each run starts and how its results inform the next step.

Automate your development workflow

Use the Code Review APIs when you automate parts of your software development lifecycle and need more control over that process. This kind of system is sometimes called a software factory: a workflow that coordinates code generation, reviews, continuous integration (CI), and risk assessment across multiple vendors, tools, and services. In a software factory, you may need to:
  • Control when reviews run and at which points in your workflow.
  • Combine Unblocked findings with reviews from other tools or human reviewers.
  • Assess risk separately to decide whether to continue automatically or request human approval.
Runs return results without posting comments, reviews, or statuses to the pull request or modifying it. Your workflow decides what to publish and what action to take.

Where to integrate in your workflow

Your workflow chooses when to call each service and what to do with its results. In this example, it requests a review after code generation, sends findings back for fixes, and assesses risk after CI and other reviews pass. A left-to-right development workflow: generate code, request a review, run CI and other reviews, then apply approval rules. Review and risk checkpoints send a pull request URL to Unblocked and receive findings or risk scores; findings can send code back for changes. A left-to-right development workflow: generate code, request a review, run CI and other reviews, then apply approval rules. Review and risk checkpoints send a pull request URL to Unblocked and receive findings or risk scores; findings can send code back for changes. Code review and risk assessment are separate API calls, so you can run either independently at the points you choose. Your automation can combine review findings, risk scores, and CI results from multiple tools to decide what happens next. Each run analyzes an existing pull request.

Making requests

Runs are asynchronous: you create a run with a POST request, then fetch its results with a GET request. Code reviews return findings with file paths and line ranges; risk assessments return a risk score and rationale. Submit the pull request URL as prUrl, then use the returned run ID to poll the corresponding GET endpoint until the status is complete and the results are available. Request a new run when you need results for updated code.