diff --git a/src/k16/kl/api/github.clj b/src/k16/kl/api/github.clj index 66d6d28..3187b76 100644 --- a/src/k16/kl/api/github.clj +++ b/src/k16/kl/api/github.clj @@ -6,9 +6,13 @@ (set! *warn-on-reflection* true) +(def ^:private cached-auth-token + (delay + (let [res (proc/sh ["gh" "auth" "token"])] + (-> res :out str/trim)))) + (defn- get-auth-token [] - (let [res (proc/sh ["gh" "auth" "token"])] - (-> res :out str/trim))) + @cached-auth-token) (defn request [{:keys [path headers]}] (let [res