aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2022-05-08 01:41:30 +0200
committerTeddy Wing2022-05-08 01:41:30 +0200
commit12f20a6e2324bf17212bc4e95c6cbb91d853fe60 (patch)
tree449decfd70c2f48bbff4dff3f405c190e376f5fa
parent325c79d91fb39bbe4e153e22131239fb1123c735 (diff)
downloadwajir-12f20a6e2324bf17212bc4e95c6cbb91d853fe60.tar.bz2
watch-issues: Change to `watch-issue`
Move the loop outside this function. Makes more sense to have it in `run`, which is doing the pagination etc. This function can worry about watching a single issue.
-rw-r--r--src/main.lisp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main.lisp b/src/main.lisp
index 0706a33..2e80fc7 100644
--- a/src/main.lisp
+++ b/src/main.lisp
@@ -32,7 +32,9 @@
(max-results (gethash "maxResults" response))
(total (gethash "total" response)))
- (watch-issues (gethash "issues" response))
+ (loop for issue
+ across (gethash "issues" response)
+ do (watch-issue issue))
;; Stop looping if we're on the last page of results.
(when (> start-at
@@ -50,6 +52,5 @@
(:authorization
. ,(format nil "Basic ~A" basic-auth-token))))))
-(defun watch-issues (issues)
- (loop for issue across issues do
- (format t "Watching issue ~A~%" (gethash "key" issue))))
+(defun watch-issue (issue)
+ (format t "Watching issue ~A~%" (gethash "key" issue)))