diff options
author | Teddy Wing | 2022-05-07 00:28:08 +0200 |
---|---|---|
committer | Teddy Wing | 2022-05-07 02:20:55 +0200 |
commit | 53035fa4aa5f3a471d4093e70269ae992b12feef (patch) | |
tree | e2de70c782db3a957c18e7f3ca3d2ac09e6e863c | |
parent | cdf7137e45f41d876984361f0fc23ac83112f676 (diff) | |
download | wajir-53035fa4aa5f3a471d4093e70269ae992b12feef.tar.bz2 |
Try querying issues from Jira
Set up a Common Lisp project skeleton and make a request to the
Atlassian API to get a filtered list of issues that the current user
isn't watching.
-rw-r--r-- | src/main.lisp | 17 | ||||
-rw-r--r-- | src/package.lisp | 4 | ||||
-rw-r--r-- | wajir.asd | 16 |
3 files changed, 37 insertions, 0 deletions
diff --git a/src/main.lisp b/src/main.lisp new file mode 100644 index 0000000..4c1c498 --- /dev/null +++ b/src/main.lisp @@ -0,0 +1,17 @@ +(in-package :wajir) + +(defun main () + ;; Query page of issues + ;; [Check not in database?] <- no + ;; Start watching issue + ;; Send email to ^maildir^program^ containing message with issue metadata + ;; Continue to next page + + (dex:post "https://example.atlassian.net/rest/api/3/search" + :content + "{ + \"jql\": \"project = \\\"FAKE\\\" AND watcher != currentUser() AND key > \\\"FAKE-100\\\" ORDER BY created DESC\", + \"fields\": [\"id\", \"key\", \"self\"] + }" + :headers '((:content-type . "application/json") + (:authorization . "Basic TOKEN")))) diff --git a/src/package.lisp b/src/package.lisp new file mode 100644 index 0000000..a340f86 --- /dev/null +++ b/src/package.lisp @@ -0,0 +1,4 @@ +(defpackage :wajir + (:use :cl) + + (:export :main)) diff --git a/wajir.asd b/wajir.asd new file mode 100644 index 0000000..2ebed6e --- /dev/null +++ b/wajir.asd @@ -0,0 +1,16 @@ +(asdf:defsystem wajir + :version "0.0.1" + :depends-on (:cl-smtp + :dexador) + :components ((:module "src" + :serial t + :components ((:file "package") + (:file "main")))) + + :build-operation "program-op" + :build-pathname "wajir" + :entry-point "wajir") + +#+sb-core-compression +(defmethod asdf:perform ((o asdf:image-op) (c asdf:system)) + (uiop:dump-image (asdf:output-file o c) :executable t :compression t)) |