Last active
June 22, 2020 11:17
-
-
Save benjiqq/c6b63aa3e3738772cd2e161869951f07 to your computer and use it in GitHub Desktop.
joker commits
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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