Convenience functions for GitHub's Stacks REST API.
A stack is addressed by its repository-scoped stack number. Pull request
numbers passed to create/5 and add/6 must be ordered from the bottom of
the stack to the top.
Stacked pull requests are in public preview. GitHub returns 404 Not Found
when the feature is not yet available for a repository.
Each function is a thin wrapper over GhEx.REST and returns the same
{:ok, body, meta} / {:error, reason} shape.
Summary
Functions
Adds pull requests to the top of a stack. attrs must contain
pull_requests, ordered from the stack's current top upward.
Creates a stack. attrs must contain pull_requests, an ordered list of pull
request numbers from bottom to top (minimum 2, maximum 100).
Gets a stack by its repository-scoped stack number.
Lists stacks in a repository. Use params: [pull_request: number] to find the
stack containing a particular pull request.
Auto-paginates repository stacks into a lazy Stream.
Removes the unmerged pull requests from a stack.
Types
Functions
@spec add(GhEx.Client.t(), String.t(), String.t(), number_ref(), map(), keyword()) :: GhEx.REST.result()
Adds pull requests to the top of a stack. attrs must contain
pull_requests, ordered from the stack's current top upward.
@spec create(GhEx.Client.t(), String.t(), String.t(), map(), keyword()) :: GhEx.REST.result()
Creates a stack. attrs must contain pull_requests, an ordered list of pull
request numbers from bottom to top (minimum 2, maximum 100).
@spec get(GhEx.Client.t(), String.t(), String.t(), number_ref(), keyword()) :: GhEx.REST.result()
Gets a stack by its repository-scoped stack number.
@spec list(GhEx.Client.t(), String.t(), String.t(), keyword()) :: GhEx.REST.result()
Lists stacks in a repository. Use params: [pull_request: number] to find the
stack containing a particular pull request.
@spec stream(GhEx.Client.t(), String.t(), String.t(), keyword()) :: Enumerable.t()
Auto-paginates repository stacks into a lazy Stream.
@spec unstack(GhEx.Client.t(), String.t(), String.t(), number_ref(), keyword()) :: GhEx.REST.result()
Removes the unmerged pull requests from a stack.
Pull requests that are merged, merging, or queued for merge remain. GitHub
returns the remaining stack with 200, or 204 No Content when the stack is
fully dissolved.