summaryrefslogtreecommitdiffstats
path: root/models/webhook.go
diff options
context:
space:
mode:
authorKurt Madel <kmadel@mac.com>2016-08-24 23:44:58 -0400
committer无闻 <u@gogs.io>2016-08-24 20:44:58 -0700
commit67fb0fe6a5783f772abfb5438a154435dafff4de (patch)
treeef53dd2d2312e85aa391dae2e58e5aa5022d305c /models/webhook.go
parent0b273ac4d566837b668d9e521476cd94ac28b6d4 (diff)
downloadgitea-67fb0fe6a5783f772abfb5438a154435dafff4de.tar.gz
gitea-67fb0fe6a5783f772abfb5438a154435dafff4de.zip
added support to set pull_request event from api (#3513)
Diffstat (limited to 'models/webhook.go')
-rw-r--r--models/webhook.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/models/webhook.go b/models/webhook.go
index 01a014223b..2db0274115 100644
--- a/models/webhook.go
+++ b/models/webhook.go
@@ -165,13 +165,16 @@ func (w *Webhook) HasPullRequestEvent() bool {
}
func (w *Webhook) EventsArray() []string {
- events := make([]string, 0, 2)
+ events := make([]string, 0, 3)
if w.HasCreateEvent() {
events = append(events, "create")
}
if w.HasPushEvent() {
events = append(events, "push")
}
+ if w.HasPullRequestEvent() {
+ events = append(events, "pull_request")
+ }
return events
}