Skip to main content
POST
/
repos
/
{repo_id}
/
workspaces
/
{workspace_id}
/
commit-draft
Create draft commit
curl --request POST \
  --url https://api.diversion.dev/v0/repos/{repo_id}/workspaces/{workspace_id}/commit-draft \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "message": "<string>",
  "title": "<string>",
  "description": "<string>",
  "reviewer_ids": [
    "<string>"
  ],
  "include_paths": [
    "<string>"
  ]
}
'
{
  "review_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"

workspace_id
string
required

The repo ID of the workspace.

Required string length: 3 - 128
Example:

"example_id"

Body

application/json
message
string

Commit message for the draft

title
string

Title for the review (defaults to message)

description
string

Description for the review

reviewer_ids
string[]

User IDs of reviewers to assign

include_paths
string[] | null

Inclusion list of paths to include in the operation. If null, all paths will be included.

Minimum array length: 1

A relative path to a file or directory inside the repository.

Minimum string length: 1

Response

Draft commit created successfully

review_id
string

Associated review ID if created