From 6afdaa4730c143d21031a51b0cb78ecbc5bd9e32 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 8 May 2022 00:26:23 +0200 Subject: Move "main" into "run" This should make it easier to test with real values by passing in a single config object. --- src/main.lisp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src') 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) -- cgit v1.2.3