Skip to content

Commit

Permalink
Replace YASON by Jonathan.
Browse files Browse the repository at this point in the history
  • Loading branch information
fukamachi committed Aug 27, 2015
1 parent 2806945 commit 8e13685
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
3 changes: 2 additions & 1 deletion qlot-install.asd
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
:salza2
:gzip-stream
:ironclad
:yason
:jonathan
:babel
:alexandria
:cl-ppcre
:uiop
Expand Down
18 changes: 10 additions & 8 deletions src/source/github.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
:url)
(:import-from :qlot.http
:safety-http-request)
(:import-from :yason
(:import-from :jonathan
:parse)
(:import-from :babel
:octets-to-string)
(:export :source-github
:source-github-repos
:source-github-ref
Expand Down Expand Up @@ -60,13 +62,13 @@
(defun retrieve-source-git-ref-from-github (source)
(let ((github-access-token (uiop:getenv "GITHUB_ACCESS_TOKEN")))
(labels ((retrieve-from-github (action)
(yason:parse
(apply #'safety-http-request
(format nil "https://api.github.com/repos/~A/~A" (source-github-repos source) action)
:want-stream t
(if github-access-token
(list :basic-authorization (list github-access-token "x-oauth-basic"))
'()))))
(let ((json
(apply #'safety-http-request
(format nil "https://api.github.com/repos/~A/~A" (source-github-repos source) action)
(if github-access-token
(list :basic-authorization (list github-access-token "x-oauth-basic"))
'()))))
(jojo:parse (babel:octets-to-string json) :as :hash-table)))
(find-ref (results name)
(let ((result (find-if (lambda (result)
(string= (gethash "name" result) name))
Expand Down

0 comments on commit 8e13685

Please sign in to comment.