GitHub.Issues (GitHub Issues v0.4.35) View Source
Fetches a list of issues from a GitHub project.
Link to this section Summary
Functions
Fetches issues from a GitHub project
of a given user
.
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 SourceSpecs
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 userproject
- GitHub projecturl_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