     (println "Started Server on port " port ". CTRL+C to abort.")
     (start-server port)))
 
-(defn get-trigger-id []
-  (((val (last (lambdacd.internal.pipeline-state/get-all (get-in @pipe [:context :pipeline-state-component])))) '(1 1)) :trigger-id)
-  )
-
-(defn trigger-new []
-  (let [ctx (:context @pipe)]
-    (manualtrigger/post-id ctx (get-trigger-id) {})))
(ns lambdaui.core
  (:require
    [compojure.core :refer [routes GET context]]
    [lambdaui.api :as new-api]
    [lambdacd-git.core :as git]
    [lambdacd.core :as lambdacd]

    [compojure.route :as route])
  (:gen-class)
  )


(defn get-trigger-id [pipeline]
  (((val (last (lambdacd.internal.pipeline-state/get-all (get-in pipeline [:context :pipeline-state-component])))) '(1 1)) :trigger-id)
  )

(defn trigger-new [pipeline]
  (let [ctx (:context pipeline)]
    (manualtrigger/post-id ctx (get-trigger-id pipeline) {})))

(defn try-parse-int [port default-fn]
  (try (Integer/parseInt port) (catch NumberFormatException e (default-fn e))))
