This module defines the egithub_webhook behaviour.
Required callback functions: handle_pull_request/3, handle_error/3.
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.
file() = map()
message() = #{commit_id => string(), path => binary(), position => pos_integer(), text => binary()}
req_data() = map()
review() = #{commit_id => string() | binary(), body => string() | binary(), event => review_event(), comments => [review_comment()]}
review_comment() = #{path => string() | binary(), position => pos_integer(), body => string() | binary()}
review_event() = string() | binary()
"APPROVE" | "REQUEST_CHANGES".
webhook_target_url() = string() | undefined
event/3 | Should be called from the endpoint that handles the GitHub's request for the webhook. |
event/6 | Should be called from the endpoint that handles the GitHub's request for the webhook. |
event(Module::atom(), Cred::egithub:credentials(), Request::egithub_webhook_req:request()) -> ok | {error, term()}
Should be called from the endpoint that handles the GitHub's request for the webhook.
event(Module::atom(), StatusCred::egithub:credentials(), ToolName::string(), Context::string(), CommentsCred::egithub:credentials(), Request::egithub_webhook_req:request()) -> ok | {error, term()}
Should be called from the endpoint that handles the GitHub's request for the webhook.
The credentials provided in theStatusCred
argument need
to have the appropiate permissions to be able to change the
repository's status.
Generated by EDoc