aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2022-05-08 00:26:23 +0200
committerTeddy Wing2022-05-08 00:29:59 +0200
commit6afdaa4730c143d21031a51b0cb78ecbc5bd9e32 (patch)
tree10fc4da6f200d13747b29a0a4b8d47e52949e16a
parent4c8807c172026efe02b6944166b4a1bb9b6f254e (diff)
downloadwajir-6afdaa4730c143d21031a51b0cb78ecbc5bd9e32.tar.bz2
Move "main" into "run"
This should make it easier to test with real values by passing in a single config object.
-rw-r--r--src/main.lisp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/main.lisp b/src/main.lisp
index c441207..ecf0ed3 100644
--- a/src/main.lisp
+++ b/src/main.lisp
@@ -7,16 +7,20 @@
;; Send email to ^maildir^program^ containing message with issue metadata
;; Continue to next page
- (let* ((config (make-instance 'config
+ (let ((config (make-instance 'config
:login "name@example.com"
:token "atlassian-token"
:endpoint "example.atlassian.net"
- :jql "project = \"FAKE\" AND watcher != currentUser() AND key > \"FAKE-100\" ORDER BY created DESC"))
- (basic-auth-token (cl-base64:string-to-base64-string
- (format nil
- "~A:~A"
- (login config)
- (token config)))))
+ :jql "project = \"FAKE\" AND watcher != currentUser() AND key > \"FAKE-100\" ORDER BY created DESC")))
+
+ (run config)))
+
+(defun run (config)
+ (let ((basic-auth-token (cl-base64:string-to-base64-string
+ (format nil
+ "~A:~A"
+ (login config)
+ (token config)))))
(fetch-issues
(endpoint config)