Convenience functions for the GitHub Repositories REST API.
Thin wrappers over GhEx.REST that fill in the endpoint path and return the
same {:ok, body, meta} / {:error, reason} shape; opts pass through to
Req (so :params, headers, and a Req.Test plug all work). For an endpoint
without a wrapper, call GhEx.REST directly.
Summary
Functions
Creates a repository in an organization. attrs is the JSON body (name, private, ...).
Deletes a repository.
Gets a repository.
Lists branches on a repository.
Lists commits on a repository. Use params: for sha, path, since, until.
Lists repositories for an organization. Use params: for type, sort, per_page.
Lists public repositories for a user.
Auto-paginates a repository's branches into a lazy Stream.
Auto-paginates a repository's commits into a lazy Stream.
Auto-paginates an organization's repositories into a lazy Stream.
Auto-paginates a user's public repositories into a lazy Stream.
Updates a repository.
Functions
@spec create_in_org(GhEx.Client.t(), String.t(), map(), keyword()) :: GhEx.REST.result()
Creates a repository in an organization. attrs is the JSON body (name, private, ...).
@spec delete(GhEx.Client.t(), String.t(), String.t(), keyword()) :: GhEx.REST.result()
Deletes a repository.
@spec get(GhEx.Client.t(), String.t(), String.t(), keyword()) :: GhEx.REST.result()
Gets a repository.
@spec list_branches(GhEx.Client.t(), String.t(), String.t(), keyword()) :: GhEx.REST.result()
Lists branches on a repository.
@spec list_commits(GhEx.Client.t(), String.t(), String.t(), keyword()) :: GhEx.REST.result()
Lists commits on a repository. Use params: for sha, path, since, until.
@spec list_for_org(GhEx.Client.t(), String.t(), keyword()) :: GhEx.REST.result()
Lists repositories for an organization. Use params: for type, sort, per_page.
@spec list_for_user(GhEx.Client.t(), String.t(), keyword()) :: GhEx.REST.result()
Lists public repositories for a user.
@spec stream_branches(GhEx.Client.t(), String.t(), String.t(), keyword()) :: Enumerable.t()
Auto-paginates a repository's branches into a lazy Stream.
@spec stream_commits(GhEx.Client.t(), String.t(), String.t(), keyword()) :: Enumerable.t()
Auto-paginates a repository's commits into a lazy Stream.
@spec stream_for_org(GhEx.Client.t(), String.t(), keyword()) :: Enumerable.t()
Auto-paginates an organization's repositories into a lazy Stream.
@spec stream_for_user(GhEx.Client.t(), String.t(), keyword()) :: Enumerable.t()
Auto-paginates a user's public repositories into a lazy Stream.
@spec update(GhEx.Client.t(), String.t(), String.t(), map(), keyword()) :: GhEx.REST.result()
Updates a repository.