PR webhook handler fix

This commit is contained in:
Teemu Patja 2017-11-02 22:29:11 +02:00
parent 0bd33449f0
commit f3be62cd55
No known key found for this signature in database
GPG Key ID: F5B7035E6580FD4C
1 changed files with 6 additions and 5 deletions

View File

@ -202,11 +202,12 @@
(defn handle-pull-request
[pull-request]
(case (:action pull-request)
"opened" (handle-pull-request-event :opened pull-request)
"closed" (handle-pull-request-event :closed pull-request)
nil)
(ok))
(let [action (keyword (:action pull-request))]
(when (contains? #{:opened
:edited
:closed} action)
(handle-pull-request-event action pull-request))
(ok)))
(defn validate-secret [webhook-payload raw-payload github-signature]