Lilictocat v0.1.2 Lilictocat.Github View Source

this module consumes the github API, and makes the necessary transformations to use the data

Link to this section Summary

Functions

returns a list of pull requests with status open.

returns a list of repositories.

returns a list of organiztions.

returns a boolean to indicate if the pull request has any review.

Link to this section Functions

Link to this function

open_pull_requests_of_organization()

View Source

Specs

open_pull_requests_of_organization() :: Enumerable.t()

returns a list of pull requests with status open.

Examples

iex> Lilictocat.Github.open_pull_requests_of_organization()
[
  %{
    created_at: "2020-07-23T17:41:20Z",
    html_url: "https://link_pr.com/1",
    number: 1,
    base: %{repo: %{full_name: "dominaria_inc/zoombie"}}
    },
    %{
    created_at: "2020-08-23T17:41:20Z",
    html_url: "https://link_pr.com/2",
    number: 2,
    base: %{repo: %{full_name: "dominaria_inc/goblin"}}
  }
]

Specs

organization_repos() :: Enumerable.t()

returns a list of repositories.

Examples

iex> Lilictocat.Github.organization_repos()
[
%{owner: %{login: "dominaria inc"}, name: "zoombie"},
%{owner: %{login: "dominaria inc"}, name: "goblin"}
]

Specs

organizations() :: list()

returns a list of organiztions.

Examples

iex> Lilictocat.Github.organizations()
["dominaria inc"]
Link to this function

pull_request_without_review?(map)

View Source

Specs

pull_request_without_review?(map()) :: boolean()

returns a boolean to indicate if the pull request has any review.

Examples

iex> Lilictocat.Github.pull_request_without_review(%{project: "dominaria_inc/goblin", number: 21})
true