Skip to content

Instantly share code, notes, and snippets.

@benjiqq
Last active June 22, 2020 11:17
Show Gist options
  • Save benjiqq/c6b63aa3e3738772cd2e161869951f07 to your computer and use it in GitHub Desktop.
Save benjiqq/c6b63aa3e3738772cd2e161869951f07 to your computer and use it in GitHub Desktop.
joker commits
(ns github
(:require
[joker.http :as h]
[joker.json :as j]))
(defonce url "https://api.github.com/repos/candid82/joker/commits")
(defn get-commits
[]
(j/read-string (:body (joker.http/send {:url url}))))
(defn format-commit
[c]
(let [m (get-in c ["commit" "message"])
d (get-in c ["commit" "committer" "date"])]
(str m " " d)))
(doseq [commits (take 10 (get-commits))]
(println (format-commit commits)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment