Convenience functions for the GitHub Deployments REST API.
Thin wrappers over GhEx.REST that return the same {:ok, body, meta} /
{:error, reason} shape; opts pass through to Req.
A deployment represents a request to deploy a ref, not its changing lifecycle
state. Progress is recorded as a sequence of deployment statuses. Automation
waiting for completion should inspect the latest item from list_statuses/5
(or consume stream_statuses/5) rather than repeatedly fetching the deployment.
Summary
Functions
Creates a deployment for a ref.
Appends a status to a deployment.
Gets a deployment by id. Read its statuses to observe lifecycle progress.
Lists deployments in a repository. Use params: to filter by ref, SHA, task, or environment.
Lists the status history for a deployment.
Auto-paginates a repository's deployments into a lazy Stream.
Auto-paginates a deployment's status history into a lazy Stream.
Types
Functions
@spec create(GhEx.Client.t(), String.t(), String.t(), map(), keyword()) :: GhEx.REST.result()
Creates a deployment for a ref.
attrs must contain ref; it may also include task, auto_merge,
required_contexts, payload, environment, and environment metadata.
@spec create_status(GhEx.Client.t(), String.t(), String.t(), id(), map(), keyword()) :: GhEx.REST.result()
Appends a status to a deployment.
attrs must contain state; supported states include error, failure,
inactive, in_progress, queued, pending, and success.
@spec get(GhEx.Client.t(), String.t(), String.t(), id(), keyword()) :: GhEx.REST.result()
Gets a deployment by id. Read its statuses to observe lifecycle progress.
@spec list(GhEx.Client.t(), String.t(), String.t(), keyword()) :: GhEx.REST.result()
Lists deployments in a repository. Use params: to filter by ref, SHA, task, or environment.
@spec list_statuses(GhEx.Client.t(), String.t(), String.t(), id(), keyword()) :: GhEx.REST.result()
Lists the status history for a deployment.
Deployment progress is represented by these status records; inspect the latest record when deciding whether a deployment has reached a terminal state.
@spec stream(GhEx.Client.t(), String.t(), String.t(), keyword()) :: Enumerable.t()
Auto-paginates a repository's deployments into a lazy Stream.
@spec stream_statuses(GhEx.Client.t(), String.t(), String.t(), id(), keyword()) :: Enumerable.t()
Auto-paginates a deployment's status history into a lazy Stream.