Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support github pull request merge action #117

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
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