Custodian v0.0.1 Custodian.Github View Source

The GitHub context provides a boundary into the GitHub API client interface and associated domain logic. The top-level class provides a way to process webhook payloads from GitHub.

Link to this section Summary

Types

Pull request identifier as a tuple with the repo and integer ID

Functions

Calls the processing function appropriate for the type and params

Link to this section Types

Link to this type pull_request() View Source
pull_request() :: {Custodian.Bots.Bot.t(), integer()}

Pull request identifier as a tuple with the repo and integer ID.

Link to this section Functions

Link to this function process_event(type, params) View Source
process_event(String.t(), map()) :: :ok | {:error, atom()}

Calls the processing function appropriate for the type and params.

Events

Currently, the app responds to the following GitHub webhook events:

For any other event, it fails.

Examples

iex> process_event("installation", %{})
{:ok, [%Bot]}

iex> process_event("pull_request", %{})
{:ok, [%Bot]}