diff --git a/src/clj/commiteth/routes/webhooks.clj b/src/clj/commiteth/routes/webhooks.clj index 5c739a7..f59af0a 100644 --- a/src/clj/commiteth/routes/webhooks.clj +++ b/src/clj/commiteth/routes/webhooks.clj @@ -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]