ramen v0.1.3 Ramen.Decoder
A module that knows how to translate GitHub’s webhook payloads into understandable structs
Link to this section Summary
Functions
Decodes an issue event. The second attribute on the tuple, namely action
, can
be the following values
Link to this section Functions
Link to this function
decode(payload, event_name)
decode(map(), String.t()) :: {atom(), atom(), %Ramen.Comment{ author: term(), body: term(), number: term(), organization: term(), repository: term(), title: term(), url: term() }}
decode(map(), String.t()) :: {atom(), atom(), %Ramen.Comment{ author: term(), body: term(), number: term(), organization: term(), repository: term(), title: term(), url: term() }}
decode(map(), String.t()) :: {atom(), atom(), %Ramen.PullRequestReview{ author: term(), number: term(), organization: term(), owner: term(), repository: term(), title: term(), url: term() }}
decode(map(), String.t()) :: {atom(), atom(), %Ramen.ReviewRequest{ number: term(), organization: term(), repository: term(), requester: term(), reviewer: term(), title: term(), url: term() }}
decode(map(), String.t()) :: {atom(), atom(), %Ramen.BuildStatus{author: term(), branch: term(), url: term()}}
decode(map(), String.t()) :: {atom(), atom(), %Ramen.Issue{ assignee: term(), author: term(), body: term(), number: term(), organization: term(), repository: term(), title: term(), url: term() }}
Decodes an issue event. The second attribute on the tuple, namely action
, can
be the following values:
- :assigned
- :unassigned
- :labeled
- :unlabeled
- :opened
- :edited
- :milestoned
- :demilestoned
- :closed
- :reopened
Returns a tuple containing {:issue, action, struct}