Module egithub_webhook

Implements the code to handle GitHub's webhook events.

Description

Implements the code to handle GitHub's webhook events. All callbacks defined map to a specific GitHub event, for example the handle_pull_request callback is used for pull_request events. It also offers the option of reporting the progress of your webhook handler through the Statused API functions, by using the event/6 function.

Data Types

file()

file() = #{}

message()

message() = #{commit_id => string(), path => binary(), position => pos_integer(), text => binary()}

req_data()

req_data() = #{}

request()

request() = #{headers => #{}, body => #{}}

Function Index

event/3Should be called from the endpoint that handles the GitHub's request for the webhook.
event/6Should be called from the endpoint that handles the GitHub's request for the webhook.

Function Details

event/3

event(Module::atom(), Cred::egithub:credentials(), X3::request()) -> ok | {error, term()}

Should be called from the endpoint that handles the GitHub's request for the webhook.

event/6

event(Module::atom(), StatusCred::egithub:credentials(), ToolName::string(), Context::string(), CommentsCred::egithub:credentials(), Request::request()) -> ok | {error, term()}

Should be called from the endpoint that handles the GitHub's request for the webhook.

The credentials provided in the StatusCred argument need to have the appropiate permissions to be able to change the repository's status.


Generated by EDoc, May 17 2016, 14:51:38.