Skip to content
Open
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
12 changes: 5 additions & 7 deletions scm/driver/github/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,11 @@ func (s *webhookService) parsePullRequestHook(data []byte) (scm.Webhook, error)
case "edited":
dst.Action = scm.ActionUpdate
case "closed":
// TODO(bradrydzewski) github does not provide a merged action,
// but this is provided by gitlab and bitbucket. Is it possible
// to emulate the merge action?

// if merged == true
// dst.Action = scm.ActionMerge
dst.Action = scm.ActionClose
if dst.PullRequest.Merged {
dst.Action = scm.ActionMerge
} else {
dst.Action = scm.ActionClose
}
case "reopened":
dst.Action = scm.ActionReopen
case "synchronize":
Expand Down