| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Use the REST API to interact with stacked pull requests.
Lists pull request stacks in a repository.
This endpoint works with the following fine-grained token types:
The fine-grained token must have the following permission set:
This endpoint can be used without authentication or the aforementioned permissions if only public resources are requested.
| Name, Type, Description |
|---|
accept string Setting to application/vnd.github+json is recommended. |
| Name, Type, Description |
|---|
owner string Required The account owner of the repository. The name is not case sensitive. |
repo string Required The name of the repository without the .git extension. The name is not case sensitive. |
| Name, Type, Description |
|---|
pull_request integer Filter to the stack containing this repository pull request number. |
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." Default: 30 |
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." Default: 1 |
| Status code | Description |
|---|---|
| 200 | OK |
| 404 | Resource not found |
| 422 | Validation failed, or the endpoint has been spammed. |
Response
Creates a stack from an ordered list of pull request numbers. Provide the pull request numbers from the bottom of the stack to the top. Each pull request's base ref must match the previous pull request's head ref.
This endpoint works with the following fine-grained token types:
The fine-grained token must have the following permission set:
| Name, Type, Description |
|---|
accept string Setting to application/vnd.github+json is recommended. |
| Name, Type, Description |
|---|
owner string Required The account owner of the repository. The name is not case sensitive. |
repo string Required The name of the repository without the .git extension. The name is not case sensitive. |
| Name, Type, Description |
|---|
pull_requests array of integers Required An ordered list of pull request numbers forming the stack from bottom to top. |
| Status code | Description |
|---|---|
| 201 | Created |
| 404 | Resource not found |
| 422 | Validation failed. Returned when the request references pull requests that don't exist in the repository, or when the pull requests can't form a valid stack. |
Response
Gets a pull request stack by providing its stack number.
This endpoint works with the following fine-grained token types:
The fine-grained token must have the following permission set:
This endpoint can be used without authentication or the aforementioned permissions if only public resources are requested.
| Name, Type, Description |
|---|
accept string Setting to application/vnd.github+json is recommended. |
| Name, Type, Description |
|---|
owner string Required The account owner of the repository. The name is not case sensitive. |
repo string Required The name of the repository without the .git extension. The name is not case sensitive. |
stack_number integer Required The number that identifies the pull request stack. |
| Status code | Description |
|---|---|
| 200 | OK |
| 404 | Resource not found |
Response
Appends an ordered list of pull request numbers onto the top of an existing stack. Provide only the pull requests you want to add, from the current top of the stack upward. The first new pull request's base ref must match the current top pull request's head ref.
This endpoint works with the following fine-grained token types:
The fine-grained token must have the following permission set:
| Name, Type, Description |
|---|
accept string Setting to application/vnd.github+json is recommended. |
| Name, Type, Description |
|---|
owner string Required The account owner of the repository. The name is not case sensitive. |
repo string Required The name of the repository without the .git extension. The name is not case sensitive. |
stack_number integer Required The number that identifies the pull request stack. |
| Name, Type, Description |
|---|
pull_requests array of integers Required An ordered list of pull request numbers to append to the stack, from the current top upward. |
| Status code | Description |
|---|---|
| 200 | OK |
| 404 | Resource not found |
| 409 | Conflict. Returned when the stack is being modified by another request. |
| 422 | Validation failed. Returned when the request references pull requests that don't exist in the repository, or when the pull requests can't be appended to the stack. |
Response
Removes the unmerged pull requests from a stack. Pull requests that cannot be unstacked (for example, those that are queued for merge) are left in place. When pull requests remain in the stack, the updated stack is returned with a 200. When no pull requests remain, the stack is dissolved and a 204 is returned.
This endpoint works with the following fine-grained token types:
The fine-grained token must have the following permission set:
| Name, Type, Description |
|---|
accept string Setting to application/vnd.github+json is recommended. |
| Name, Type, Description |
|---|
owner string Required The account owner of the repository. The name is not case sensitive. |
repo string Required The name of the repository without the .git extension. The name is not case sensitive. |
stack_number integer Required The number that identifies the pull request stack. |
| Status code | Description |
|---|---|
| 200 | OK |
| 204 | A header with no content is returned. |
| 404 | Resource not found |
| 409 | Conflict. Returned when the stack is being modified by another request. |
| 422 | Validation failed. Returned when the stack can't be unstacked because every pull request in it is locked and cannot be removed. |
Response
| Back | FazBrowse Home | New Git URL |