aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.lisp
diff options
context:
space:
mode:
authorTeddy Wing2022-05-08 06:19:10 +0200
committerTeddy Wing2022-05-08 06:19:10 +0200
commit27a205d81647c9df3c6c04f36062b87987d5ae99 (patch)
tree429152d5559ec9b398bca32f553dee14e8e44f0b /src/main.lisp
parent22461379250147870550d4d9cd43dc67f65892a9 (diff)
downloadwajir-27a205d81647c9df3c6c04f36062b87987d5ae99.tar.bz2
Format 'issue created' email
Include a selection of metadata values in the email. I needed to pass `config` to `deliver-email` in order to be able to build a URL to the ticket based on the `endpoint` field. Also needed to make the field list a vector instead of a list, otherwise 'jzon' interpreted it as being a plist and serialized it to a JSON object.
Diffstat (limited to 'src/main.lisp')
-rw-r--r--src/main.lisp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/main.lisp b/src/main.lisp
index e48cf34..7c0f368 100644
--- a/src/main.lisp
+++ b/src/main.lisp
@@ -66,13 +66,14 @@
:content
(jzon:stringify
`((:jql . ,jql)
- (:fields . ("id"
- "key"
- "project"
- "summary"
- "description"
- "issuetype"
- "reporter"))
+ (:fields . #("id"
+ "key"
+ "project"
+ "summary"
+ "description"
+ "issuetype"
+ "creator"
+ "reporter"))
(:|startAt| . ,start-at)))
:headers `((:content-type . "application/json")
(:authorization
@@ -83,4 +84,4 @@
;; 2. Send email
(format t "Watching issue ~A~%" (gethash "key" issue))
- (deliver-email (email-to config) issue))
+ (deliver-email config issue))