pass through the true webhook action when parsing
This commit is contained in:
parent
93e052a713
commit
e51ef216f3
1 changed files with 1 additions and 4 deletions
|
@ -246,7 +246,7 @@ func (p *parser) Parse(req *http.Request, secretFunc func(string) string) (*core
|
|||
hook = &core.Hook{
|
||||
Trigger: core.TriggerHook, // core.TriggerHook,
|
||||
Event: core.EventPullRequest,
|
||||
Action: core.ActionCreate,
|
||||
Action: v.Action.String(),
|
||||
Link: v.PullRequest.Link,
|
||||
Timestamp: v.PullRequest.Created.Unix(),
|
||||
Title: v.PullRequest.Title,
|
||||
|
@ -262,9 +262,6 @@ func (p *parser) Parse(req *http.Request, secretFunc func(string) string) (*core
|
|||
AuthorAvatar: v.PullRequest.Author.Avatar,
|
||||
Sender: v.Sender.Login,
|
||||
}
|
||||
if v.Action != scm.ActionSync {
|
||||
hook.Action = core.ActionSync
|
||||
}
|
||||
// HACK this is a workaround for github. The pull
|
||||
// request title is populated, but not the message.
|
||||
if hook.Message == "" {
|
||||
|
|
Loading…
Reference in a new issue