Skip to content

Commit

Permalink
Merge pull request #2 from thenonameguy/patch-2
Browse files Browse the repository at this point in the history
Only do network IO when accessed
  • Loading branch information
raszi committed Oct 16, 2015
2 parents 8940e28 + 240dbf6 commit fed62cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/hu/ssh/github_changelog.clj
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
(defn changelog
"Fetches the changelog"
[user repo]
(let [tags (map #(assoc % :version (parse-semver %)) (repos/tags user repo))
pulls (pulls/pulls user repo {:state "closed"})
commits (repos/commits user repo)]
(println (first tags))))
(let [tags (delay (map #(assoc % :version (parse-semver %)) (repos/tags user repo)))
pulls (delay (pulls/pulls user repo {:state "closed"}))
commits (delay (repos/commits user repo))]
(println (first @tags))))

(core/with-defaults {:oauth-token (env :github-token) :all_pages true}
(changelog "raszi" "node-tmp"))

0 comments on commit fed62cf

Please sign in to comment.