POST
/repos/{owner}/{repo}/stacks/{stack_number}/addAdd pull requests to a pull request stack
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.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
ownerstringrequired
The account owner of the repository. The name is not case sensitive.
repostringrequired
The name of the repository without the `.git` extension. The name is not case sensitive.
stack_numberintegerrequired
The number that identifies the pull request stack.
pull_requestsarray<integer>required
An ordered list of pull request numbers to append to the stack, from the current top upward.
200Response
idintegerrequired
numberintegerrequired
node_idstringrequired
urlstringrequired
baseobjectrequired
openbooleanrequired
Whether the stack has any open pull request. False when all pull requests are merged or closed.
created_atstringrequired
pull_requestsarray<PullRequestStackPullRequest>required
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
409Conflict. Returned when the stack is being modified by another request.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
422Validation 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.
One documented failure
missingpull_requestsOne or more pull request numbers don't exist in the repository
messagestringrequired
documentation_urlstringrequired
errorsarray<object>optional
Error handling
A 404 is returned: Resource not found. A 409 is returned: Conflict. Returned when the stack is being modified by another request. A 422 is returned: 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.
Was this helpful?