Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions example/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func webhookHandler(w http.ResponseWriter, r *http.Request) {
gitfox.PullReqCreatedEvent, gitfox.PullReqReopenedEvent, gitfox.PullReqBranchUpdatedEvent,
gitfox.PullReqClosedEvent, gitfox.PullReqCommentCreatedEvent, gitfox.PullReqMergedEvent,
gitfox.PullReqReviewerCreatedEvent, gitfox.PullReqReviewerDeletedEvent, gitfox.PullReqReviewSubmittedEvent,
gitfox.PullReqRequiredChecksPassedEvent,
)
if err != nil {
if err == gitfox.ErrEventNotFound {
Expand Down
13 changes: 7 additions & 6 deletions gitfox/gitfox.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ const (
PullReqCommentCreatedEvent HookEventType = "pullreq_comment_created"
PullReqCommentUpdatedEvent HookEventType = "pullreq_comment_updated"
// PullReqCommentStatusUpdated HookEventType = "pullreq_comment_status_updated"
PullReqMergedEvent HookEventType = "pullreq_merged"
PullReqReviewerCreatedEvent HookEventType = "pullreq_reviewer_created"
PullReqReviewerDeletedEvent HookEventType = "pullreq_reviewer_deleted"
PullReqReviewSubmittedEvent HookEventType = "pullreq_review_submitted"
PullReqUpdatedEvent HookEventType = "pullreq_updated"
PullReqMergedEvent HookEventType = "pullreq_merged"
PullReqReviewerCreatedEvent HookEventType = "pullreq_reviewer_created"
PullReqRequiredChecksPassedEvent HookEventType = "pullreq_required_checks_passed"
PullReqReviewerDeletedEvent HookEventType = "pullreq_reviewer_deleted"
PullReqReviewSubmittedEvent HookEventType = "pullreq_review_submitted"
PullReqUpdatedEvent HookEventType = "pullreq_updated"
)

// Option is a configuration option for the webhook
Expand Down Expand Up @@ -192,7 +193,7 @@ func (hook Webhook) Parse(r *http.Request, events ...HookEventType) (interface{}
var pl PullReqUpdatedPayload
err = json.Unmarshal([]byte(payload), &pl)
return pl, err
case PullReqReviewerCreatedEvent:
case PullReqReviewerCreatedEvent, PullReqRequiredChecksPassedEvent:
var pl PullReqReviewerCreatedPayload
err = json.Unmarshal([]byte(payload), &pl)
return pl, err
Expand Down
Loading