Reopen PullRequest
Request
POST
https://api.sourcecraft.tech/repos/{org_slug}/{repo_slug}/pulls/{pull_request_slug}/reopen
Path parameters
|
Name |
Description |
|
org_slug |
Type: string Example: `` |
|
pull_request_slug |
Type: string Example: `` |
|
repo_slug |
Type: string Example: `` |
Query parameters
|
Name |
Description |
|
pull_request_id |
Type: string Example: `` |
|
silent |
Type: boolean |
Responses
200 OK
A successful response.
Body
application/json
{
"id": "example",
"slug": "example",
"author": {
"id": "example",
"slug": "example"
},
"updated_by": null,
"title": "example",
"description": "example",
"repository": {
"id": "example",
"slug": "example",
"organization": {
"id": "example",
"slug": "example"
}
},
"merge_info": {
"merger": null,
"merge_parameters": {
"rebase": true,
"squash": true,
"delete_branch": true
},
"target_commit_hash": "example",
"error": "example",
"merge_commit_hash": "example"
},
"source_branch": "example",
"target_branch": "example",
"status": "draft",
"created_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z",
"labels": [
{
"id": "example",
"slug": "example",
"name": "example",
"color": "example"
}
],
"source": {
"label": "example",
"ref": "example",
"sha": "example"
},
"target": null
}
|
Name |
Description |
|
author |
Type: UserEmbedded Example
|
|
created_at |
Type: string<date-time> Example: |
|
description |
Type: string Example: |
|
id |
Type: string Example: |
|
labels |
Type: LabelEmbedded[] Example
|
|
merge_info |
Type: MergeInfo Example
|
|
repository |
Type: RepositoryEmbedded Example
|
|
slug |
Type: string Example: |
|
source |
Type: PullRequestBranch Example
|
|
source_branch |
Type: string Example: |
|
status |
Type: PullRequest.Status Enum: |
|
target |
Type: PullRequestBranch Example
|
|
target_branch |
Type: string Example: |
|
title |
Type: string Example: |
|
updated_at |
Type: string<date-time> Example: |
|
updated_by |
Type: UserEmbedded Example
|
UserEmbedded
|
Name |
Description |
|
id |
Type: string Example: |
|
slug |
Type: string Example: |
Example
{
"id": "example",
"slug": "example"
}
RepositoryEmbedded
|
Name |
Description |
|
id |
Type: string Example: |
|
organization |
Type: OrganizationEmbedded Example
|
|
slug |
Type: string Example: |
Example
{
"id": "example",
"slug": "example",
"organization": {
"id": "example",
"slug": "example"
}
}
MergeParameters
|
Name |
Description |
|
delete_branch |
Type: boolean |
|
rebase |
Type: boolean |
|
squash |
Type: boolean |
Example
{
"rebase": true,
"squash": true,
"delete_branch": true
}
MergeInfo
|
Name |
Description |
|
error |
Type: string Example: |
|
merge_commit_hash |
Type: string Example: |
|
merge_parameters |
Type: MergeParameters Example
|
|
merger |
Type: UserEmbedded Example
|
|
target_commit_hash |
Type: string Example: |
Example
{
"merger": {
"id": "example",
"slug": "example"
},
"merge_parameters": {
"rebase": true,
"squash": true,
"delete_branch": true
},
"target_commit_hash": "example",
"error": "example",
"merge_commit_hash": "example"
}
PullRequest.Status
Type: string
Enum: draft, open, discarded, merging, merged
LabelEmbedded
|
Name |
Description |
|
color |
Type: string Example: |
|
id |
Type: string Example: |
|
name |
Type: string Example: |
|
slug |
Type: string Example: |
Example
{
"id": "example",
"slug": "example",
"name": "example",
"color": "example"
}
PullRequestBranch
|
Name |
Description |
|
label |
Type: string Example: |
|
ref |
Type: string Example: |
|
sha |
Type: string Example: |
Example
{
"label": "example",
"ref": "example",
"sha": "example"
}
default
Both Client Errors (4xx) and Server Errors (5xx) are serialized into this scheme
Body
application/json
{
"error_code": "example",
"message": "example",
"request_id": "example",
"details": {}
}
|
Name |
Description |
||
|
details |
Type: Optional details. Exact structure depends on error_code
Example
|
||
|
error_code |
Type: string Example: |
||
|
message |
Type: string Example: |
||
|
request_id |
Type: string Example: |