atlassian-cli 0.11.0__tar.gz → 0.12.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {atlassian_cli-0.11.0/src/atlassian_cli.egg-info → atlassian_cli-0.12.0}/PKG-INFO +8 -1
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/README.md +7 -0
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/pyproject.toml +1 -1
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/src/atlassian_cli/confluence.py +16 -23
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/src/atlassian_cli/jira_issues.py +13 -6
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0/src/atlassian_cli.egg-info}/PKG-INFO +8 -1
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/tests/test_confluence.py +14 -0
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/tests/test_jira_issues.py +16 -0
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/LICENSE +0 -0
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/setup.cfg +0 -0
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/src/atlassian_cli/__init__.py +0 -0
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/src/atlassian_cli/adf.py +0 -0
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/src/atlassian_cli/config.py +0 -0
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/src/atlassian_cli/hints.py +0 -0
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/src/atlassian_cli/http.py +0 -0
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/src/atlassian_cli/jira.py +0 -0
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/src/atlassian_cli/jira_assets.py +0 -0
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/src/atlassian_cli/output.py +0 -0
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/src/atlassian_cli/update_check.py +0 -0
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/src/atlassian_cli.egg-info/SOURCES.txt +0 -0
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/src/atlassian_cli.egg-info/dependency_links.txt +0 -0
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/src/atlassian_cli.egg-info/entry_points.txt +0 -0
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/src/atlassian_cli.egg-info/requires.txt +0 -0
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/src/atlassian_cli.egg-info/top_level.txt +0 -0
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/tests/test_adf.py +0 -0
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/tests/test_config.py +0 -0
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/tests/test_http.py +0 -0
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/tests/test_jira_assets.py +0 -0
- {atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/tests/test_output.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: atlassian-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.12.0
|
|
4
4
|
Summary: Fast CLI tools for Atlassian Cloud (Confluence + Jira) — optimized for AI agents
|
|
5
5
|
Author-email: Alex Fishlock <alex.fishlock@catapult.cx>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -108,6 +108,13 @@ confluence sync COMPLY --workers 20 --force
|
|
|
108
108
|
confluence sync POL --md # writes pages/POL/<id>.md
|
|
109
109
|
confluence get 9268920323 --md # single page, as markdown
|
|
110
110
|
|
|
111
|
+
# `--body` accepts markdown — headings, lists, tables, code blocks, links,
|
|
112
|
+
# emphasis. Use `--file` for raw ADF when you need macros / panel boxes.
|
|
113
|
+
confluence create POL "Quarterly update" --body "# Q2 Highlights
|
|
114
|
+
|
|
115
|
+
- Shipped X
|
|
116
|
+
- Improved Y"
|
|
117
|
+
|
|
111
118
|
# Search local page index by title (instant, no API call)
|
|
112
119
|
confluence search "risk assessment"
|
|
113
120
|
|
|
@@ -77,6 +77,13 @@ confluence sync COMPLY --workers 20 --force
|
|
|
77
77
|
confluence sync POL --md # writes pages/POL/<id>.md
|
|
78
78
|
confluence get 9268920323 --md # single page, as markdown
|
|
79
79
|
|
|
80
|
+
# `--body` accepts markdown — headings, lists, tables, code blocks, links,
|
|
81
|
+
# emphasis. Use `--file` for raw ADF when you need macros / panel boxes.
|
|
82
|
+
confluence create POL "Quarterly update" --body "# Q2 Highlights
|
|
83
|
+
|
|
84
|
+
- Shipped X
|
|
85
|
+
- Improved Y"
|
|
86
|
+
|
|
80
87
|
# Search local page index by title (instant, no API call)
|
|
81
88
|
confluence search "risk assessment"
|
|
82
89
|
|
|
@@ -131,11 +131,7 @@ def create_blogpost(session, base, space_id, title, *, body=None, file=None,
|
|
|
131
131
|
elif body:
|
|
132
132
|
body_payload = {
|
|
133
133
|
'representation': 'atlas_doc_format',
|
|
134
|
-
'value': json.dumps(
|
|
135
|
-
'type': 'doc', 'version': 1,
|
|
136
|
-
'content': [{'type': 'paragraph',
|
|
137
|
-
'content': [{'type': 'text', 'text': body}]}],
|
|
138
|
-
}),
|
|
134
|
+
'value': json.dumps(_make_adf_body(body)),
|
|
139
135
|
}
|
|
140
136
|
|
|
141
137
|
payload = {
|
|
@@ -184,11 +180,7 @@ def update_blogpost(session, base, blogpost_id, *,
|
|
|
184
180
|
elif body is not None:
|
|
185
181
|
body_payload = {
|
|
186
182
|
'representation': 'atlas_doc_format',
|
|
187
|
-
'value': json.dumps(
|
|
188
|
-
'type': 'doc', 'version': 1,
|
|
189
|
-
'content': [{'type': 'paragraph',
|
|
190
|
-
'content': [{'type': 'text', 'text': body}]}],
|
|
191
|
-
}),
|
|
183
|
+
'value': json.dumps(_make_adf_body(body)),
|
|
192
184
|
}
|
|
193
185
|
else:
|
|
194
186
|
body_value = remote.get('body', {}).get('atlas_doc_format', {}).get('value')
|
|
@@ -347,11 +339,7 @@ def cmd_create(args):
|
|
|
347
339
|
elif args.body:
|
|
348
340
|
body_payload = {
|
|
349
341
|
'representation': 'atlas_doc_format',
|
|
350
|
-
'value': json.dumps(
|
|
351
|
-
'type': 'doc', 'version': 1,
|
|
352
|
-
'content': [{'type': 'paragraph',
|
|
353
|
-
'content': [{'type': 'text', 'text': args.body}]}],
|
|
354
|
-
}),
|
|
342
|
+
'value': json.dumps(_make_adf_body(args.body)),
|
|
355
343
|
}
|
|
356
344
|
|
|
357
345
|
payload = {
|
|
@@ -906,14 +894,19 @@ def _adf_to_text(node):
|
|
|
906
894
|
|
|
907
895
|
|
|
908
896
|
def _make_adf_body(text):
|
|
909
|
-
"""
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
897
|
+
"""Convert ``text`` (treated as markdown) to a full ADF document.
|
|
898
|
+
|
|
899
|
+
Plain strings round-trip unchanged (single paragraph). Markdown
|
|
900
|
+
constructs — headings, lists, tables, code blocks, links, emphasis —
|
|
901
|
+
are parsed into structured ADF nodes via ``md_to_adf``. If you need
|
|
902
|
+
raw ADF (e.g. for Confluence macros / panel boxes), use ``--file``
|
|
903
|
+
on commands that support it instead of this code path.
|
|
904
|
+
"""
|
|
905
|
+
from atlassian_cli.adf import md_to_adf
|
|
906
|
+
content = md_to_adf(text) if text else []
|
|
907
|
+
if not content:
|
|
908
|
+
content = [{'type': 'paragraph', 'content': []}]
|
|
909
|
+
return {'type': 'doc', 'version': 1, 'content': content}
|
|
917
910
|
|
|
918
911
|
|
|
919
912
|
def list_comments(session, base, page_id, comment_type='inline'):
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import json
|
|
4
4
|
import sys
|
|
5
5
|
|
|
6
|
-
from atlassian_cli.adf import adf_to_markdown
|
|
6
|
+
from atlassian_cli.adf import adf_to_markdown, md_to_adf
|
|
7
7
|
from atlassian_cli.config import setup
|
|
8
8
|
from atlassian_cli.http import api_delete, api_get, api_post, api_put
|
|
9
9
|
from atlassian_cli.output import emit, emit_error, emit_json, is_json_mode
|
|
@@ -24,11 +24,18 @@ def _extract_text(adf_body):
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
def _text_adf(text):
|
|
27
|
-
"""
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
"""Convert ``text`` (treated as markdown) to a full ADF document.
|
|
28
|
+
|
|
29
|
+
Plain strings round-trip unchanged (single paragraph). Markdown
|
|
30
|
+
constructs — headings, lists, tables, code blocks, links, emphasis —
|
|
31
|
+
are parsed into structured ADF nodes via ``md_to_adf``. If you need
|
|
32
|
+
to send raw ADF (e.g. for macros), use ``--file`` on commands that
|
|
33
|
+
support it instead of this code path.
|
|
34
|
+
"""
|
|
35
|
+
content = md_to_adf(text) if text else []
|
|
36
|
+
if not content:
|
|
37
|
+
content = [{'type': 'paragraph', 'content': []}]
|
|
38
|
+
return {'type': 'doc', 'version': 1, 'content': content}
|
|
32
39
|
|
|
33
40
|
|
|
34
41
|
def cmd_get(args):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: atlassian-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.12.0
|
|
4
4
|
Summary: Fast CLI tools for Atlassian Cloud (Confluence + Jira) — optimized for AI agents
|
|
5
5
|
Author-email: Alex Fishlock <alex.fishlock@catapult.cx>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -108,6 +108,13 @@ confluence sync COMPLY --workers 20 --force
|
|
|
108
108
|
confluence sync POL --md # writes pages/POL/<id>.md
|
|
109
109
|
confluence get 9268920323 --md # single page, as markdown
|
|
110
110
|
|
|
111
|
+
# `--body` accepts markdown — headings, lists, tables, code blocks, links,
|
|
112
|
+
# emphasis. Use `--file` for raw ADF when you need macros / panel boxes.
|
|
113
|
+
confluence create POL "Quarterly update" --body "# Q2 Highlights
|
|
114
|
+
|
|
115
|
+
- Shipped X
|
|
116
|
+
- Improved Y"
|
|
117
|
+
|
|
111
118
|
# Search local page index by title (instant, no API call)
|
|
112
119
|
confluence search "risk assessment"
|
|
113
120
|
|
|
@@ -297,6 +297,20 @@ class TestMakeAdfBody:
|
|
|
297
297
|
assert result["type"] == "doc"
|
|
298
298
|
assert result["content"][0]["content"][0]["text"] == "Hello"
|
|
299
299
|
|
|
300
|
+
def test_markdown_heading_and_list(self):
|
|
301
|
+
md = "# Title\n\n- item one\n- item two"
|
|
302
|
+
result = _make_adf_body(md)
|
|
303
|
+
types = [n["type"] for n in result["content"]]
|
|
304
|
+
assert types == ["heading", "bulletList"]
|
|
305
|
+
assert result["content"][0]["attrs"]["level"] == 1
|
|
306
|
+
items = result["content"][1]["content"]
|
|
307
|
+
assert len(items) == 2
|
|
308
|
+
|
|
309
|
+
def test_empty_text(self):
|
|
310
|
+
result = _make_adf_body("")
|
|
311
|
+
assert result["type"] == "doc"
|
|
312
|
+
assert len(result["content"]) >= 1
|
|
313
|
+
|
|
300
314
|
|
|
301
315
|
class TestListComments:
|
|
302
316
|
@responses.activate
|
|
@@ -39,6 +39,22 @@ class TestTextAdf:
|
|
|
39
39
|
assert result["type"] == "doc"
|
|
40
40
|
assert result["content"][0]["content"][0]["text"] == "Hello world"
|
|
41
41
|
|
|
42
|
+
def test_markdown_heading_and_list(self):
|
|
43
|
+
md = "# Title\n\n- item one\n- item two"
|
|
44
|
+
result = _text_adf(md)
|
|
45
|
+
types = [n["type"] for n in result["content"]]
|
|
46
|
+
assert types == ["heading", "bulletList"]
|
|
47
|
+
assert result["content"][0]["attrs"]["level"] == 1
|
|
48
|
+
assert result["content"][0]["content"][0]["text"] == "Title"
|
|
49
|
+
items = result["content"][1]["content"]
|
|
50
|
+
assert len(items) == 2
|
|
51
|
+
|
|
52
|
+
def test_empty_text(self):
|
|
53
|
+
result = _text_adf("")
|
|
54
|
+
assert result["type"] == "doc"
|
|
55
|
+
# Empty input still yields a valid doc the API will accept
|
|
56
|
+
assert len(result["content"]) >= 1
|
|
57
|
+
|
|
42
58
|
def test_extracts_text(self):
|
|
43
59
|
adf = _text_adf("Hello world")
|
|
44
60
|
assert _extract_text(adf) == "Hello world"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{atlassian_cli-0.11.0 → atlassian_cli-0.12.0}/src/atlassian_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|