diff options
author | Teddy Wing | 2022-05-08 02:49:40 +0200 |
---|---|---|
committer | Teddy Wing | 2022-05-08 02:49:40 +0200 |
commit | 9a6c9d1d6e43bfa441a41f27a114883030d4d421 (patch) | |
tree | 8cbd24345d894b429063d376d8462af3a40bf7c8 | |
parent | 3e14748a6f3aa07b72dc1c4150bf457a29dfbf1d (diff) | |
download | wajir-9a6c9d1d6e43bfa441a41f27a114883030d4d421.tar.bz2 |
fetch-issues: Use Jira Cloud API v2 instead of v3
The Atlassian API documentation for Jira Cloud describes the difference
between version 2 and version 3:
> This documentation is for version 3 of the Jira Cloud platform REST
> API, which is the latest version but is in beta. Version 2 and version
> 3 of the API offer the same collection of operations. However, version
> 3 provides support for the Atlassian Document Format (ADF) in:
>
> * body in comments, including where comments are used in issue, issue
> link, and transition resources.
> * comment in worklogs.
> * description and environment fields in issues.
> * textarea type custom fields (multi-line text fields) in issues.
> Single line custom fields (textfield) accept a string and don't handle
> Atlassian Document Format content.
>
> However, these new features are under development and may change.
https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#version
The Atlassian Document Format referenced is described in JSON. Here is
an excerpt of an issue description in the format:
"description": {
"version": 1,
"type": "doc",
"content": [
{
"type": "heading",
"attrs": {
"level": 2
},
"content": [
{
"type": "text",
"text": "Context"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
That format would make it much harder to get an issue's description text
for easy inclusion in an email. Fortunately, we can switch to version 2
of the Cloud API with no loss of functionality, and get a plain text
description suitable for inclusion in an email message.
-rw-r--r-- | src/main.lisp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.lisp b/src/main.lisp index 0c78c99..d15ab6e 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -57,7 +57,7 @@ (defun fetch-issues (endpoint jql start-at &key basic-auth-token) (jzon:parse - (dex:post (format nil "https://~A/rest/api/3/search" endpoint) + (dex:post (format nil "https://~A/rest/api/2/search" endpoint) :content (jzon:stringify `((:jql . ,jql) |