GitHub.Issues (GitHub Issues v0.4.39) View Source

Fetches a list of issues from a GitHub project.

Link to this section Summary

Link to this section Types

Specs

issue() :: map()

Link to this section Functions

Link to this function

fetch(user, project, url_template \\ "https://api.github.com/repos/<%=user%>/<%=project%>/issues")

View Source

Specs

fetch(GitHub.Issues.CLI.user(), GitHub.Issues.CLI.project(), String.t()) ::
  {:ok, [issue()]} | {:error, String.t()}

Fetches issues from a GitHub project of a given user.

Returns a tuple of either {:ok, [issue]} or {:error, text}.

Parameters

  • user - GitHub user
  • project - GitHub project
  • url_template - URL template (EEx string)

Examples

iex> alias GitHub.Issues
iex> {:ok, issues} = Issues.fetch("opendrops", "passport")
iex> Enum.all?(issues, &is_map/1) and length(issues) > 0
true