API
PullRequestMagicMerge
Operations
Every route this entity exposes. Each route links to its own reference on this page.
| Method | Route | SDK operation | Returns |
|---|---|---|---|
POST |
/api/v1/organizations/{org_slug}/github/pull_requests/{github_repository_id}/{number}/magic_merge/merge |
create |
The exact merge commit was applied and read back |
POST |
/api/v1/organizations/{org_slug}/github/pull_requests/{github_repository_id}/{number}/magic_merge/rebase |
create |
The exact candidate was applied and read back |
POST |
/api/v1/organizations/{org_slug}/github/pull_requests/{github_repository_id}/{number}/magic_merge/resolve |
create |
A clean candidate was published privately |
Fields
| Field | Type | Required | Description |
|---|
create
POST /api/v1/organizations/{org_slug}/github/pull_requests/{github_repository_id}/{number}/magic_merge/merge
Operation ID: post_api_v1_organizations_org_slug_github_pull_requests_github_repository_id_number_magic_merge_merge.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
org_slug |
path |
string |
Yes | |
github_repository_id |
path |
string |
Yes | |
number |
path |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
expected_base_sha |
string |
Yes | |
expected_head_sha |
string |
Yes |
Responses
200: The exact merge commit was applied and read back
application/json
| Property | Type | Required | Description |
|---|---|---|---|
applied_at |
string |
Yes | |
expected_head_sha |
string |
Yes | |
reason |
string |
Yes | |
status |
string |
Yes | |
tip_sha |
string |
Yes |
401: Unauthorized
403: GitHub repository admin access is required
404: Not found
409: The candidate was refused or its GitHub outcome is uncertain
422: Unprocessable entity
502: Bad gateway
POST /api/v1/organizations/{org_slug}/github/pull_requests/{github_repository_id}/{number}/magic_merge/rebase
Operation ID: post_api_v1_organizations_org_slug_github_pull_requests_github_repository_id_number_magic_merge_rebase.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
org_slug |
path |
string |
Yes | |
github_repository_id |
path |
string |
Yes | |
number |
path |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
idempotency_key |
string |
Yes |
Responses
200: The exact candidate was applied and read back
application/json
| Property | Type | Required | Description |
|---|---|---|---|
applied_at |
string |
Yes | |
expected_head_sha |
string |
Yes | |
reason |
string |
Yes | |
status |
string |
Yes | |
tip_sha |
string |
Yes |
401: Unauthorized
403: Forbidden
404: Not found
409: The approval was refused or the Git push outcome is uncertain
422: Unprocessable entity
502: Bad gateway
POST /api/v1/organizations/{org_slug}/github/pull_requests/{github_repository_id}/{number}/magic_merge/resolve
Operation ID: post_api_v1_organizations_org_slug_github_pull_requests_github_repository_id_number_magic_merge_resolve.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
org_slug |
path |
string |
Yes | |
github_repository_id |
path |
string |
Yes | |
number |
path |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
expected_base_sha |
string |
Yes | |
expected_head_sha |
string |
Yes | |
mode |
enum: merge, rebase |
Yes | |
resolutions |
array of object or object or object |
Yes |
Responses
200: A clean candidate was published privately
application/json
| Property | Type | Required | Description |
|---|---|---|---|
resolution_ref |
string |
Yes | |
status |
string |
Yes | |
tip_sha |
string |
Yes |