Convenience functions for the GitHub Releases REST API.
Thin wrappers over GhEx.REST that return the same {:ok, body, meta} /
{:error, reason} shape; opts pass through to Req.
Summary
Functions
Creates a release. attrs is the JSON body (tag_name, name, body, draft, prerelease, ...).
Deletes a release.
Generates a release name and Markdown body without saving a release.
Gets a release by id.
Gets a release by tag name.
Gets the latest published release.
Lists releases for a repository.
Auto-paginates a repository's releases into a lazy Stream (see GhEx.REST.stream/3).
Updates a release.
Uploads raw asset data to a release's dedicated upload endpoint.
Types
Functions
@spec create(GhEx.Client.t(), String.t(), String.t(), map(), keyword()) :: GhEx.REST.result()
Creates a release. attrs is the JSON body (tag_name, name, body, draft, prerelease, ...).
@spec delete(GhEx.Client.t(), String.t(), String.t(), id(), keyword()) :: GhEx.REST.result()
Deletes a release.
@spec generate_release_notes( GhEx.Client.t(), String.t(), String.t(), map(), keyword() ) :: GhEx.REST.result()
Generates a release name and Markdown body without saving a release.
attrs must contain tag_name and may include target_commitish,
previous_tag_name, or configuration_file_path.
@spec get(GhEx.Client.t(), String.t(), String.t(), id(), keyword()) :: GhEx.REST.result()
Gets a release by id.
@spec get_by_tag(GhEx.Client.t(), String.t(), String.t(), String.t(), keyword()) :: GhEx.REST.result()
Gets a release by tag name.
@spec get_latest(GhEx.Client.t(), String.t(), String.t(), keyword()) :: GhEx.REST.result()
Gets the latest published release.
@spec list(GhEx.Client.t(), String.t(), String.t(), keyword()) :: GhEx.REST.result()
Lists releases for a repository.
@spec stream(GhEx.Client.t(), String.t(), String.t(), keyword()) :: Enumerable.t()
Auto-paginates a repository's releases into a lazy Stream (see GhEx.REST.stream/3).
@spec update(GhEx.Client.t(), String.t(), String.t(), id(), map(), keyword()) :: GhEx.REST.result()
Updates a release.
@spec upload_asset(GhEx.Client.t(), String.t(), String.t(), id(), asset(), keyword()) :: GhEx.REST.result()
Uploads raw asset data to a release's dedicated upload endpoint.
The asset map requires :name, :content_type, and raw :data; :label is
optional. GitHub.com uploads use uploads.github.com, while a GitHub Enterprise
Server client whose REST URL ends in /api/v3 uses /api/uploads on the same
origin.
To use the hypermedia URL returned by GitHub when creating or fetching a
release, pass it as upload_url: release["upload_url"]. URI-template suffixes
such as {?name,label} are removed automatically.
The wrapper owns the request body, name/label query parameters, and
Content-Type header. Other opts pass through to Req.