Convenience functions for the GitHub Issues REST API.
Each function is a thin wrapper over GhEx.REST that fills in the endpoint
path. They return the same {:ok, body, meta} / {:error, reason} shape as
GhEx.REST and pass opts 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
Adds labels to an issue. labels is a list of label names.
Creates an issue. attrs is the JSON body (title, body, labels, assignees, ...).
Adds a comment to an issue.
Gets a single issue by number.
Lists issues in a repository. Use params: for state, labels, per_page,
and the other query options.
Lists the comments on an issue.
Updates an issue. attrs may set title, body, state, labels, and so on.
Types
Functions
@spec add_labels( GhEx.Client.t(), String.t(), String.t(), number_ref(), [String.t()], keyword() ) :: GhEx.REST.result()
Adds labels to an issue. labels is a list of label names.
@spec create(GhEx.Client.t(), String.t(), String.t(), map(), keyword()) :: GhEx.REST.result()
Creates an issue. attrs is the JSON body (title, body, labels, assignees, ...).
@spec create_comment( GhEx.Client.t(), String.t(), String.t(), number_ref(), String.t(), keyword() ) :: GhEx.REST.result()
Adds a comment to an issue.
@spec get(GhEx.Client.t(), String.t(), String.t(), number_ref(), keyword()) :: GhEx.REST.result()
Gets a single issue by number.
@spec list(GhEx.Client.t(), String.t(), String.t(), keyword()) :: GhEx.REST.result()
Lists issues in a repository. Use params: for state, labels, per_page,
and the other query options.
@spec list_comments(GhEx.Client.t(), String.t(), String.t(), number_ref(), keyword()) :: GhEx.REST.result()
Lists the comments on an issue.
@spec update(GhEx.Client.t(), String.t(), String.t(), number_ref(), map(), keyword()) :: GhEx.REST.result()
Updates an issue. attrs may set title, body, state, labels, and so on.