forked from forgejo/forgejo
added support to set pull_request event from api (#3513)
This commit is contained in:
parent
0b273ac4d5
commit
67fb0fe6a5
2 changed files with 8 additions and 3 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue