Skip to main content
POST
/
repos
/
{repo_id}
/
workspaces
/
{workspace_id}
/
commit-on-behalf
Commit on behalf of author
curl --request POST \
  --url https://api.diversion.dev/v0/repos/{repo_id}/workspaces/{workspace_id}/commit-on-behalf \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "commit_message": "<string>",
  "author_info": {
    "full_name": "<string>",
    "email": "[email protected]",
    "alias": "<string>"
  },
  "commit_time": 123,
  "include_paths": [
    "<string>"
  ]
}
'
{
  "id": "example_id",
  "read_only": true,
  "failed_paths": [
    "<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

Commit request for importing commits from external VCS systems. Allows specifying custom author information and timestamp. Requires Admin access to the repository.

commit_message
string
required
Maximum string length: 16384
author_info
object
required

Author information for the commit (original author from external VCS).

commit_time
integer<int64>
required

Commit timestamp (Unix seconds since epoch) from the original VCS.

include_paths
string[] | null

Inclusion list of modified paths to commit. Other modifications will not be committed.

Minimum array length: 1

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

Minimum string length: 1

Response

Workspace contains no changes to commit