Skip to content

Commit

Permalink
pass correct link to link type function
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushgaud committed Sep 4, 2024
1 parent 6ce6f99 commit 6046085
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/wrike_ist/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,20 @@
(if-let [pr (.-pull_request payload)]
(loop [links (extract-details pr)]
(when-let [{:keys [state pr-url] :as details} (first links)]
(let [link-type (find-link-type pr-url)]
(let [link-type (find-link-type (first links))]
(-> (case state
:draft
(case link-type
:wrike (wrike/link-pr details)
:azure (azure/link-pr details)
:unknown (js/console.log (str "Unknown link type: " pr-url))
:unknown (js/console.log (str "Unknown link type: " (first links)))
(js/Promise.resolve))

:open
(case link-type
:wrike (wrike/link-pr details)
:azure (azure/link-pr details)
:unknown (js/console.log (str "Unknown link type: " pr-url))
:unknown (js/console.log (str "Unknown link type: " (first links)))
(js/Promise.resolve))

;; else ignore
Expand Down

0 comments on commit 6046085

Please sign in to comment.