Skip to main content
POST
/
repos
/
{repo_id}
/
reviews
Create review
curl --request POST \
  --url https://api.diversion.dev/v0/repos/{repo_id}/reviews \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "base_ref": "<string>",
  "compare_ref": "<string>",
  "description": "<string>",
  "reviewer_ids": [
    "<string>"
  ]
}
'
{
  "id": "<string>",
  "title": "<string>",
  "status": "open",
  "author": {
    "id": "<string>",
    "image": "<string>",
    "email": "[email protected]",
    "full_name": "<string>",
    "name": "<string>",
    "tier": "EDUCATION"
  },
  "created_at": 123,
  "updated_at": 123,
  "base_ref": "<string>",
  "compare_ref": "<string>",
  "repo_id": "<string>",
  "description": "<string>",
  "reviewers": [
    {
      "id": "<string>",
      "image": "<string>",
      "email": "[email protected]",
      "full_name": "<string>",
      "name": "<string>",
      "tier": "EDUCATION"
    }
  ],
  "reviewer_statuses": [
    {
      "user_id": "<string>",
      "status": "requested",
      "updated_at": 123
    }
  ],
  "merge_commit_id": 123,
  "active_merge_id": "<string>",
  "draft_commit_id": "<string>"
}

Authorizations

Authorization
string
header
required

This API uses OAuth 2 with the implicit grant flow

Path Parameters

repo_id
string
required

The repo ID of the repository. Repo name can be used instead of the ID, but usage of ID for permanent linking and API requests is preferred.

Required string length: 3 - 128
Example:

"example_id"

Body

application/json

Payload for creating a new review

title
string
required

Review title

Maximum string length: 1024
base_ref
string
required

Base reference (branch/commit)

Maximum string length: 128
compare_ref
string
required

Compare reference (branch/commit)

Maximum string length: 128
description
string

Review description

Maximum string length: 4096
reviewer_ids
string[]

List of reviewer user IDs

Maximum string length: 256

Response

Review created successfully

Review details

id
string
required

Review ID

title
string
required

Review title

status
enum<string>
required

Review status

Available options:
open,
closed
author
object
required

User details

created_at
integer
required

Unix timestamp when the review was created

updated_at
integer
required

Unix timestamp when the review was last updated

base_ref
string
required

Base reference (branch/commit)

compare_ref
string
required

Compare reference (branch/commit)

repo_id
string
required

Repository ID

description
string

Review description

reviewers
object[]

List of reviewers

reviewer_statuses
object[]

List of reviewer statuses

merge_commit_id
integer

ID of the commit that merged this review

active_merge_id
string

ID of active merge with conflicts

draft_commit_id
string

ID of the draft commit that created this review