codapact-atlassian 0.1.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.
- codapact_atlassian-0.1.0/LICENSE +21 -0
- codapact_atlassian-0.1.0/PKG-INFO +157 -0
- codapact_atlassian-0.1.0/README.md +134 -0
- codapact_atlassian-0.1.0/codapact.yaml +217 -0
- codapact_atlassian-0.1.0/contracts/confluence-v1.json +1 -0
- codapact_atlassian-0.1.0/contracts/confluence-v2.json +1 -0
- codapact_atlassian-0.1.0/contracts/jira-platform.json +1 -0
- codapact_atlassian-0.1.0/contracts/jira-service-management.json +1 -0
- codapact_atlassian-0.1.0/contracts/jira-software.json +1 -0
- codapact_atlassian-0.1.0/contracts/teams.json +1 -0
- codapact_atlassian-0.1.0/gen/python/src/codapact_atlassian/__init__.py +6 -0
- codapact_atlassian-0.1.0/gen/python/src/codapact_atlassian/__main__.py +6 -0
- codapact_atlassian-0.1.0/gen/python/src/codapact_atlassian/_docformat.py +323 -0
- codapact_atlassian-0.1.0/gen/python/src/codapact_atlassian/_model.json +208534 -0
- codapact_atlassian-0.1.0/gen/python/src/codapact_atlassian/cli.py +12669 -0
- codapact_atlassian-0.1.0/gen/python/src/codapact_atlassian/client.py +15145 -0
- codapact_atlassian-0.1.0/gen/python/src/codapact_atlassian/py.typed +0 -0
- codapact_atlassian-0.1.0/gen/python/src/codapact_atlassian/skill/SKILL.md +49 -0
- codapact_atlassian-0.1.0/gen/python/src/codapact_atlassian/types.py +19214 -0
- codapact_atlassian-0.1.0/gen/python/tests/e2e.json +20453 -0
- codapact_atlassian-0.1.0/gen/python/tests/test_e2e.py +32 -0
- codapact_atlassian-0.1.0/handlers/docformat.py +323 -0
- codapact_atlassian-0.1.0/pyproject.toml +70 -0
- codapact_atlassian-0.1.0/pyproject.toml.orig +45 -0
- codapact_atlassian-0.1.0/tests/test_docformat.py +211 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mike Hill
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: codapact-atlassian
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Typed Python client and `codapact-atlassian` CLI for Atlassian Cloud (Jira, Jira Software, Jira Service Management, Confluence, Teams) with personas and Markdown rich text, generated by Codapact
|
|
5
|
+
Keywords: atlassian,jira,confluence,jira-service-management,markdown,adf,cli,api-client,codapact
|
|
6
|
+
Author: Mike Hill
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Classifier: Environment :: Console
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
14
|
+
Classifier: Typing :: Typed
|
|
15
|
+
Requires-Dist: codapact[keyring,browser]>=0.20.0,<0.21
|
|
16
|
+
Requires-Dist: adflux>=0.4.0,<0.5
|
|
17
|
+
Requires-Python: >=3.13
|
|
18
|
+
Project-URL: Homepage, https://github.com/mikejhill/codapact-atlassian
|
|
19
|
+
Project-URL: Repository, https://github.com/mikejhill/codapact-atlassian
|
|
20
|
+
Project-URL: Issues, https://github.com/mikejhill/codapact-atlassian/issues
|
|
21
|
+
Project-URL: Generator, https://github.com/mikejhill/codapact
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
|
|
24
|
+
# codapact-atlassian
|
|
25
|
+
|
|
26
|
+
[](https://github.com/mikejhill/codapact-atlassian/actions/workflows/ci.yml) [](https://pypi.org/project/codapact-atlassian/) [](https://pypi.org/project/codapact-atlassian/) [](https://github.com/mikejhill/codapact-atlassian/blob/HEAD/LICENSE) [](https://developer.atlassian.com/cloud/) [](https://github.com/mikejhill/codapact)
|
|
27
|
+
|
|
28
|
+
Typed Python client and `codapact-atlassian` command-line tool for [Atlassian Cloud](https://developer.atlassian.com/cloud/), generated by [Codapact](https://github.com/mikejhill/codapact).
|
|
29
|
+
|
|
30
|
+
## API source
|
|
31
|
+
|
|
32
|
+
Generated from this exact contract; regenerating it with the same Codapact version reproduces the code byte for byte.
|
|
33
|
+
|
|
34
|
+
| | |
|
|
35
|
+
| --- | --- |
|
|
36
|
+
| API | [Atlassian Cloud](https://developer.atlassian.com/cloud/) |
|
|
37
|
+
| Contract `jira` | OpenAPI [`contracts/jira-platform.json`](https://github.com/mikejhill/codapact-atlassian/blob/HEAD/contracts/jira-platform.json), pinned copy of <https://dac-static.atlassian.com/cloud/jira/platform/swagger-v3.v3.json>, SHA-256 `6959d1b5b20c5388a006d56fd33dff35634c82c652d53416b87cc61f135ce00a` |
|
|
38
|
+
| Contract `agile` | OpenAPI [`contracts/jira-software.json`](https://github.com/mikejhill/codapact-atlassian/blob/HEAD/contracts/jira-software.json), pinned copy of <https://dac-static.atlassian.com/cloud/jira/software/swagger.v3.json>, SHA-256 `4e108d54b99064475c6ba0f986cce46dcace81336e034b58a5400b93174b927a` |
|
|
39
|
+
| Contract `service-desk` | OpenAPI [`contracts/jira-service-management.json`](https://github.com/mikejhill/codapact-atlassian/blob/HEAD/contracts/jira-service-management.json), pinned copy of <https://dac-static.atlassian.com/cloud/jira/service-desk/swagger.v3.json>, SHA-256 `d76f1775926a9d25f090f15c1614210924686cd3682885fba3bd68b42b18b838` |
|
|
40
|
+
| Contract `confluence` | OpenAPI [`contracts/confluence-v2.json`](https://github.com/mikejhill/codapact-atlassian/blob/HEAD/contracts/confluence-v2.json), pinned copy of <https://dac-static.atlassian.com/cloud/confluence/openapi-v2.v3.json>, SHA-256 `40535e2a2c01547d53d824d68299098c9073e5bf7ed98a71634706759becfa31` |
|
|
41
|
+
| Contract `confluence-v1` | OpenAPI [`contracts/confluence-v1.json`](https://github.com/mikejhill/codapact-atlassian/blob/HEAD/contracts/confluence-v1.json), pinned copy of <https://dac-static.atlassian.com/cloud/confluence/swagger.v3.json>, SHA-256 `f80279e4beace901a20174044ff3dc1cf047ea9486c3dd6eff57e33e4161bf12` |
|
|
42
|
+
| Contract `teams` | OpenAPI [`contracts/teams.json`](https://github.com/mikejhill/codapact-atlassian/blob/HEAD/contracts/teams.json), pinned copy of <https://dac-static.atlassian.com/platform/teams/swagger-public-api-v1.v3.json>, SHA-256 `73cc90850588e1d920a36ed2fa4d692c06cb603ada4b31f1c53c6d7043127f24` |
|
|
43
|
+
| Version | `jira 1001.0.0-SNAPSHOT-680c8d018c8a274339997f5170ef519aaef5a745; agile 1001.0.0; service-desk 1001.0.0-SNAPSHOT-680c8d018c8a274339997f5170ef519aaef5a745; confluence 2.0.0; confluence-v1 1.0.0; teams 4.0` |
|
|
44
|
+
| Generator | [Codapact](https://github.com/mikejhill/codapact) `0.20.0` |
|
|
45
|
+
|
|
46
|
+
## Run
|
|
47
|
+
|
|
48
|
+
With [uv](https://docs.astral.sh/uv/); uvx installs the package and its runtime on first use:
|
|
49
|
+
|
|
50
|
+
```console
|
|
51
|
+
uvx codapact-atlassian --help
|
|
52
|
+
uvx --refresh-package codapact-atlassian codapact-atlassian --version # update to the latest
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Requires Python 3.13 or newer.
|
|
56
|
+
|
|
57
|
+
## Credentials
|
|
58
|
+
|
|
59
|
+
Save once in the OS keyring with `uvx codapact-atlassian auth login`, or set per shell:
|
|
60
|
+
|
|
61
|
+
- `basic`: `ATLASSIAN_BASIC_USERNAME`, `ATLASSIAN_BASIC_PASSWORD`. Use your Atlassian account email as the username and an API token as the password (create one at https://id.atlassian.com/manage-profile/security/api-tokens).
|
|
62
|
+
- `session`: `ATLASSIAN_SESSION`. For sites where API tokens are disabled: signs in through a browser window and sends the session cookies.
|
|
63
|
+
|
|
64
|
+
`<VAR>_COMMAND` runs a command that prints the secret (e.g. a password manager). `uvx codapact-atlassian doctor` checks settings, credentials, connectivity, and the login.
|
|
65
|
+
|
|
66
|
+
## Use
|
|
67
|
+
|
|
68
|
+
```console
|
|
69
|
+
uvx codapact-atlassian personas
|
|
70
|
+
uvx codapact-atlassian jira issues get --issue-id-or-key PROJ-1 --query fields.description
|
|
71
|
+
uvx codapact-atlassian jira issue-search search-issues --jql 'project = PROJ ORDER BY created DESC' --fields summary,status
|
|
72
|
+
uvx codapact-atlassian jira issue-comments add-comment --issue-id-or-key PROJ-1 --markdown 'Deployed :white_check_mark:'
|
|
73
|
+
uvx codapact-atlassian --persona agile agile board list-all-boards
|
|
74
|
+
uvx codapact-atlassian --persona confluence confluence page get --id 123456
|
|
75
|
+
uvx codapact-atlassian describe --brief # every command, for scripts and agents
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
As a library:
|
|
79
|
+
|
|
80
|
+
```python
|
|
81
|
+
from codapact_atlassian import Client
|
|
82
|
+
|
|
83
|
+
client = Client()
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Agent skill
|
|
87
|
+
|
|
88
|
+
The package ships an agent skill that points agents at the CLI. Install it into a skills folder:
|
|
89
|
+
|
|
90
|
+
```console
|
|
91
|
+
uvx codapact-atlassian skill install --dir ~/.agents/skills # or any skills folder
|
|
92
|
+
uvx codapact-atlassian skill show # print it
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Rerun after an update to refresh it; a copy with local edits needs `--force`.
|
|
96
|
+
|
|
97
|
+
## Personas
|
|
98
|
+
|
|
99
|
+
One CLI covers Jira, Jira Software (Agile), Jira Service Management, Confluence and
|
|
100
|
+
Teams: about a thousand commands. A persona shows the ones for one kind of work and
|
|
101
|
+
hides the rest from help, `describe` and completion. Hidden commands still run.
|
|
102
|
+
|
|
103
|
+
| Persona | Shows |
|
|
104
|
+
| --- | --- |
|
|
105
|
+
| `jira` (default) | Everyday issue work: issues, comments, JQL search, transitions, worklogs, attachments, links, filters, read-only project and field lookups |
|
|
106
|
+
| `agile` | Boards, sprints, backlogs, epics |
|
|
107
|
+
| `service-desk` | Service Management requests, queues, customers, organizations, knowledge base |
|
|
108
|
+
| `confluence` | Pages, blog posts, spaces, comments, attachments, labels, CQL search |
|
|
109
|
+
| `jira-admin` | All of the Jira platform API, administration included |
|
|
110
|
+
| `teams` | Atlassian Teams and their members |
|
|
111
|
+
| `all` | Every command |
|
|
112
|
+
|
|
113
|
+
Choose with `--persona NAME[,NAME]` (for example `--persona jira,agile`),
|
|
114
|
+
`ATLASSIAN_PERSONA`, or `"persona"` in the settings file. `codapact-atlassian personas`
|
|
115
|
+
lists them with their command counts.
|
|
116
|
+
|
|
117
|
+
## Markdown
|
|
118
|
+
|
|
119
|
+
Rich text is Markdown both ways. Jira issue descriptions, comments and worklogs, and
|
|
120
|
+
Confluence page, blog post and comment bodies, take `--markdown TEXT|@file|@-`; every
|
|
121
|
+
ADF document in a response comes back as Markdown. `--doc-format adf` (or
|
|
122
|
+
`ATLASSIAN_DOC_FORMAT=adf`) keeps raw ADF. The dialect (panels, status lozenges,
|
|
123
|
+
mentions, emoji, Confluence macros) is documented by `uvx adflux syntax`.
|
|
124
|
+
|
|
125
|
+
## Sign-in
|
|
126
|
+
|
|
127
|
+
Set `--base-url` (or `ATLASSIAN_BASE_URL`) to your site, for example
|
|
128
|
+
`https://your-site.atlassian.net`. One sign-in covers every product on the site:
|
|
129
|
+
|
|
130
|
+
- **API token (preferred):** `codapact-atlassian auth login --scheme basic` with your
|
|
131
|
+
Atlassian email and a token from
|
|
132
|
+
https://id.atlassian.com/manage-profile/security/api-tokens.
|
|
133
|
+
- **Browser sign-in, where API tokens are disabled:** `codapact-atlassian auth login
|
|
134
|
+
--scheme session` opens a window. The CLI fills in your email; you type your
|
|
135
|
+
password and any second factor yourself. Needs Chrome, Edge or
|
|
136
|
+
`playwright install chromium`.
|
|
137
|
+
|
|
138
|
+
Logins saved by `codapact-jira` or `codapact-confluence` keep working.
|
|
139
|
+
|
|
140
|
+
## Coming from codapact-jira or codapact-confluence
|
|
141
|
+
|
|
142
|
+
Commands gain one word naming the product: `codapact-jira issues get` is now
|
|
143
|
+
`codapact-atlassian jira issues get`, and `codapact-confluence page get` is
|
|
144
|
+
`codapact-atlassian confluence page get`. Saved logins, profiles and the settings file
|
|
145
|
+
carry over.
|
|
146
|
+
|
|
147
|
+
## Development
|
|
148
|
+
|
|
149
|
+
The code in `gen/python/` is generated by [Codapact](https://github.com/mikejhill/codapact). Do not edit it; regenerate instead:
|
|
150
|
+
|
|
151
|
+
```console
|
|
152
|
+
uvx codapact==0.20.0 sync --check # has the provider published a new contract?
|
|
153
|
+
uvx codapact==0.20.0 sync # pull it into the pinned copy
|
|
154
|
+
uvx codapact==0.20.0 generate # run where codapact.yaml is
|
|
155
|
+
uv run --directory gen/python pytest # offline: help, dry runs, scenarios
|
|
156
|
+
ATLASSIAN_E2E_LIVE=1 uv run --directory gen/python pytest -k live # read-only calls to the real API
|
|
157
|
+
```
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# codapact-atlassian
|
|
2
|
+
|
|
3
|
+
[](https://github.com/mikejhill/codapact-atlassian/actions/workflows/ci.yml) [](https://pypi.org/project/codapact-atlassian/) [](https://pypi.org/project/codapact-atlassian/) [](https://github.com/mikejhill/codapact-atlassian/blob/HEAD/LICENSE) [](https://developer.atlassian.com/cloud/) [](https://github.com/mikejhill/codapact)
|
|
4
|
+
|
|
5
|
+
Typed Python client and `codapact-atlassian` command-line tool for [Atlassian Cloud](https://developer.atlassian.com/cloud/), generated by [Codapact](https://github.com/mikejhill/codapact).
|
|
6
|
+
|
|
7
|
+
## API source
|
|
8
|
+
|
|
9
|
+
Generated from this exact contract; regenerating it with the same Codapact version reproduces the code byte for byte.
|
|
10
|
+
|
|
11
|
+
| | |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| API | [Atlassian Cloud](https://developer.atlassian.com/cloud/) |
|
|
14
|
+
| Contract `jira` | OpenAPI [`contracts/jira-platform.json`](https://github.com/mikejhill/codapact-atlassian/blob/HEAD/contracts/jira-platform.json), pinned copy of <https://dac-static.atlassian.com/cloud/jira/platform/swagger-v3.v3.json>, SHA-256 `6959d1b5b20c5388a006d56fd33dff35634c82c652d53416b87cc61f135ce00a` |
|
|
15
|
+
| Contract `agile` | OpenAPI [`contracts/jira-software.json`](https://github.com/mikejhill/codapact-atlassian/blob/HEAD/contracts/jira-software.json), pinned copy of <https://dac-static.atlassian.com/cloud/jira/software/swagger.v3.json>, SHA-256 `4e108d54b99064475c6ba0f986cce46dcace81336e034b58a5400b93174b927a` |
|
|
16
|
+
| Contract `service-desk` | OpenAPI [`contracts/jira-service-management.json`](https://github.com/mikejhill/codapact-atlassian/blob/HEAD/contracts/jira-service-management.json), pinned copy of <https://dac-static.atlassian.com/cloud/jira/service-desk/swagger.v3.json>, SHA-256 `d76f1775926a9d25f090f15c1614210924686cd3682885fba3bd68b42b18b838` |
|
|
17
|
+
| Contract `confluence` | OpenAPI [`contracts/confluence-v2.json`](https://github.com/mikejhill/codapact-atlassian/blob/HEAD/contracts/confluence-v2.json), pinned copy of <https://dac-static.atlassian.com/cloud/confluence/openapi-v2.v3.json>, SHA-256 `40535e2a2c01547d53d824d68299098c9073e5bf7ed98a71634706759becfa31` |
|
|
18
|
+
| Contract `confluence-v1` | OpenAPI [`contracts/confluence-v1.json`](https://github.com/mikejhill/codapact-atlassian/blob/HEAD/contracts/confluence-v1.json), pinned copy of <https://dac-static.atlassian.com/cloud/confluence/swagger.v3.json>, SHA-256 `f80279e4beace901a20174044ff3dc1cf047ea9486c3dd6eff57e33e4161bf12` |
|
|
19
|
+
| Contract `teams` | OpenAPI [`contracts/teams.json`](https://github.com/mikejhill/codapact-atlassian/blob/HEAD/contracts/teams.json), pinned copy of <https://dac-static.atlassian.com/platform/teams/swagger-public-api-v1.v3.json>, SHA-256 `73cc90850588e1d920a36ed2fa4d692c06cb603ada4b31f1c53c6d7043127f24` |
|
|
20
|
+
| Version | `jira 1001.0.0-SNAPSHOT-680c8d018c8a274339997f5170ef519aaef5a745; agile 1001.0.0; service-desk 1001.0.0-SNAPSHOT-680c8d018c8a274339997f5170ef519aaef5a745; confluence 2.0.0; confluence-v1 1.0.0; teams 4.0` |
|
|
21
|
+
| Generator | [Codapact](https://github.com/mikejhill/codapact) `0.20.0` |
|
|
22
|
+
|
|
23
|
+
## Run
|
|
24
|
+
|
|
25
|
+
With [uv](https://docs.astral.sh/uv/); uvx installs the package and its runtime on first use:
|
|
26
|
+
|
|
27
|
+
```console
|
|
28
|
+
uvx codapact-atlassian --help
|
|
29
|
+
uvx --refresh-package codapact-atlassian codapact-atlassian --version # update to the latest
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Requires Python 3.13 or newer.
|
|
33
|
+
|
|
34
|
+
## Credentials
|
|
35
|
+
|
|
36
|
+
Save once in the OS keyring with `uvx codapact-atlassian auth login`, or set per shell:
|
|
37
|
+
|
|
38
|
+
- `basic`: `ATLASSIAN_BASIC_USERNAME`, `ATLASSIAN_BASIC_PASSWORD`. Use your Atlassian account email as the username and an API token as the password (create one at https://id.atlassian.com/manage-profile/security/api-tokens).
|
|
39
|
+
- `session`: `ATLASSIAN_SESSION`. For sites where API tokens are disabled: signs in through a browser window and sends the session cookies.
|
|
40
|
+
|
|
41
|
+
`<VAR>_COMMAND` runs a command that prints the secret (e.g. a password manager). `uvx codapact-atlassian doctor` checks settings, credentials, connectivity, and the login.
|
|
42
|
+
|
|
43
|
+
## Use
|
|
44
|
+
|
|
45
|
+
```console
|
|
46
|
+
uvx codapact-atlassian personas
|
|
47
|
+
uvx codapact-atlassian jira issues get --issue-id-or-key PROJ-1 --query fields.description
|
|
48
|
+
uvx codapact-atlassian jira issue-search search-issues --jql 'project = PROJ ORDER BY created DESC' --fields summary,status
|
|
49
|
+
uvx codapact-atlassian jira issue-comments add-comment --issue-id-or-key PROJ-1 --markdown 'Deployed :white_check_mark:'
|
|
50
|
+
uvx codapact-atlassian --persona agile agile board list-all-boards
|
|
51
|
+
uvx codapact-atlassian --persona confluence confluence page get --id 123456
|
|
52
|
+
uvx codapact-atlassian describe --brief # every command, for scripts and agents
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
As a library:
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
from codapact_atlassian import Client
|
|
59
|
+
|
|
60
|
+
client = Client()
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Agent skill
|
|
64
|
+
|
|
65
|
+
The package ships an agent skill that points agents at the CLI. Install it into a skills folder:
|
|
66
|
+
|
|
67
|
+
```console
|
|
68
|
+
uvx codapact-atlassian skill install --dir ~/.agents/skills # or any skills folder
|
|
69
|
+
uvx codapact-atlassian skill show # print it
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Rerun after an update to refresh it; a copy with local edits needs `--force`.
|
|
73
|
+
|
|
74
|
+
## Personas
|
|
75
|
+
|
|
76
|
+
One CLI covers Jira, Jira Software (Agile), Jira Service Management, Confluence and
|
|
77
|
+
Teams: about a thousand commands. A persona shows the ones for one kind of work and
|
|
78
|
+
hides the rest from help, `describe` and completion. Hidden commands still run.
|
|
79
|
+
|
|
80
|
+
| Persona | Shows |
|
|
81
|
+
| --- | --- |
|
|
82
|
+
| `jira` (default) | Everyday issue work: issues, comments, JQL search, transitions, worklogs, attachments, links, filters, read-only project and field lookups |
|
|
83
|
+
| `agile` | Boards, sprints, backlogs, epics |
|
|
84
|
+
| `service-desk` | Service Management requests, queues, customers, organizations, knowledge base |
|
|
85
|
+
| `confluence` | Pages, blog posts, spaces, comments, attachments, labels, CQL search |
|
|
86
|
+
| `jira-admin` | All of the Jira platform API, administration included |
|
|
87
|
+
| `teams` | Atlassian Teams and their members |
|
|
88
|
+
| `all` | Every command |
|
|
89
|
+
|
|
90
|
+
Choose with `--persona NAME[,NAME]` (for example `--persona jira,agile`),
|
|
91
|
+
`ATLASSIAN_PERSONA`, or `"persona"` in the settings file. `codapact-atlassian personas`
|
|
92
|
+
lists them with their command counts.
|
|
93
|
+
|
|
94
|
+
## Markdown
|
|
95
|
+
|
|
96
|
+
Rich text is Markdown both ways. Jira issue descriptions, comments and worklogs, and
|
|
97
|
+
Confluence page, blog post and comment bodies, take `--markdown TEXT|@file|@-`; every
|
|
98
|
+
ADF document in a response comes back as Markdown. `--doc-format adf` (or
|
|
99
|
+
`ATLASSIAN_DOC_FORMAT=adf`) keeps raw ADF. The dialect (panels, status lozenges,
|
|
100
|
+
mentions, emoji, Confluence macros) is documented by `uvx adflux syntax`.
|
|
101
|
+
|
|
102
|
+
## Sign-in
|
|
103
|
+
|
|
104
|
+
Set `--base-url` (or `ATLASSIAN_BASE_URL`) to your site, for example
|
|
105
|
+
`https://your-site.atlassian.net`. One sign-in covers every product on the site:
|
|
106
|
+
|
|
107
|
+
- **API token (preferred):** `codapact-atlassian auth login --scheme basic` with your
|
|
108
|
+
Atlassian email and a token from
|
|
109
|
+
https://id.atlassian.com/manage-profile/security/api-tokens.
|
|
110
|
+
- **Browser sign-in, where API tokens are disabled:** `codapact-atlassian auth login
|
|
111
|
+
--scheme session` opens a window. The CLI fills in your email; you type your
|
|
112
|
+
password and any second factor yourself. Needs Chrome, Edge or
|
|
113
|
+
`playwright install chromium`.
|
|
114
|
+
|
|
115
|
+
Logins saved by `codapact-jira` or `codapact-confluence` keep working.
|
|
116
|
+
|
|
117
|
+
## Coming from codapact-jira or codapact-confluence
|
|
118
|
+
|
|
119
|
+
Commands gain one word naming the product: `codapact-jira issues get` is now
|
|
120
|
+
`codapact-atlassian jira issues get`, and `codapact-confluence page get` is
|
|
121
|
+
`codapact-atlassian confluence page get`. Saved logins, profiles and the settings file
|
|
122
|
+
carry over.
|
|
123
|
+
|
|
124
|
+
## Development
|
|
125
|
+
|
|
126
|
+
The code in `gen/python/` is generated by [Codapact](https://github.com/mikejhill/codapact). Do not edit it; regenerate instead:
|
|
127
|
+
|
|
128
|
+
```console
|
|
129
|
+
uvx codapact==0.20.0 sync --check # has the provider published a new contract?
|
|
130
|
+
uvx codapact==0.20.0 sync # pull it into the pinned copy
|
|
131
|
+
uvx codapact==0.20.0 generate # run where codapact.yaml is
|
|
132
|
+
uv run --directory gen/python pytest # offline: help, dry runs, scenarios
|
|
133
|
+
ATLASSIAN_E2E_LIVE=1 uv run --directory gen/python pytest -k live # read-only calls to the real API
|
|
134
|
+
```
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
version: 1
|
|
2
|
+
api:
|
|
3
|
+
name: Atlassian Cloud
|
|
4
|
+
docs: Jira, Jira Software (Agile), Jira Service Management, Confluence and Teams on one Atlassian Cloud site.
|
|
5
|
+
sources:
|
|
6
|
+
- name: jira
|
|
7
|
+
type: openapi
|
|
8
|
+
path: contracts/jira-platform.json
|
|
9
|
+
upstream: https://dac-static.atlassian.com/cloud/jira/platform/swagger-v3.v3.json
|
|
10
|
+
shape:
|
|
11
|
+
- select:
|
|
12
|
+
include: ["/rest/api/3/*"]
|
|
13
|
+
exclude: [searchForIssuesUsingJql, searchForIssuesUsingJqlPost] # removed by Atlassian
|
|
14
|
+
- rename:
|
|
15
|
+
operations:
|
|
16
|
+
search_and_reconsile_issues_using_jql: search_issues
|
|
17
|
+
search_and_reconsile_issues_using_jql_post: search_issues_post
|
|
18
|
+
- server: {url: "https://your-site.atlassian.net"}
|
|
19
|
+
- group: {by: tag}
|
|
20
|
+
- headers: {addAttachment: {X-Atlassian-Token: no-check}}
|
|
21
|
+
- auth: {schemes: {basic: basic}}
|
|
22
|
+
- name: agile
|
|
23
|
+
type: openapi
|
|
24
|
+
path: contracts/jira-software.json
|
|
25
|
+
upstream: https://dac-static.atlassian.com/cloud/jira/software/swagger.v3.json
|
|
26
|
+
shape:
|
|
27
|
+
- select: {include: ["/rest/agile/1.0/*"]}
|
|
28
|
+
- server: {url: "https://your-site.atlassian.net"}
|
|
29
|
+
- group: {by: tag}
|
|
30
|
+
- auth: {schemes: {basic: basic}}
|
|
31
|
+
- name: service-desk
|
|
32
|
+
type: openapi
|
|
33
|
+
path: contracts/jira-service-management.json
|
|
34
|
+
upstream: https://dac-static.atlassian.com/cloud/jira/service-desk/swagger.v3.json
|
|
35
|
+
options: {strict: false} # the contract reuses seven operationIds on two paths each
|
|
36
|
+
shape:
|
|
37
|
+
- select: {include: ["/rest/servicedeskapi/*"]}
|
|
38
|
+
- rename: # the contract reuses these operationIds; the copies get readable names
|
|
39
|
+
operations:
|
|
40
|
+
post_rest_servicedeskapi_customer_skip_permission_check: create_customer_skip_permission_check
|
|
41
|
+
post_rest_servicedeskapi_servicedesk_by_service_desk_id_customer_skip_permission_check: add_customers_skip_permission_check
|
|
42
|
+
get_rest_servicedeskapi_servicedesk_by_service_desk_id_knowledgebase_article: get_service_desk_articles
|
|
43
|
+
get_rest_servicedeskapi_servicedesk_by_service_desk_id_organization: get_service_desk_organizations
|
|
44
|
+
get_rest_servicedeskapi_servicedesk_by_service_desk_id_requesttype_by_request_type_id_property: get_request_type_properties_keys
|
|
45
|
+
get_rest_servicedeskapi_servicedesk_by_service_desk_id_requesttype_by_request_type_id_property_by_property_key: get_request_type_property
|
|
46
|
+
put_rest_servicedeskapi_servicedesk_by_service_desk_id_requesttype_by_request_type_id_property_by_property_key: set_request_type_property
|
|
47
|
+
delete_rest_servicedeskapi_servicedesk_by_service_desk_id_requesttype_by_request_type_id_property_by_property_key: delete_request_type_property
|
|
48
|
+
- server: {url: "https://your-site.atlassian.net"}
|
|
49
|
+
- group: {by: tag}
|
|
50
|
+
- auth: {schemes: {basic: basic}}
|
|
51
|
+
- name: confluence
|
|
52
|
+
type: openapi
|
|
53
|
+
path: contracts/confluence-v2.json
|
|
54
|
+
upstream: https://dac-static.atlassian.com/cloud/confluence/openapi-v2.v3.json
|
|
55
|
+
shape:
|
|
56
|
+
- server: {url: "https://your-site.atlassian.net", prefix: /wiki/api/v2}
|
|
57
|
+
- group: {by: tag}
|
|
58
|
+
- auth: {schemes: {basic: basic}}
|
|
59
|
+
- name: confluence-v1
|
|
60
|
+
namespace: confluence
|
|
61
|
+
type: openapi
|
|
62
|
+
path: contracts/confluence-v1.json
|
|
63
|
+
upstream: https://dac-static.atlassian.com/cloud/confluence/swagger.v3.json
|
|
64
|
+
shape:
|
|
65
|
+
- select: {include: ["/wiki/rest/api/search*"]}
|
|
66
|
+
- server: {url: "https://your-site.atlassian.net"}
|
|
67
|
+
- group: {by: tag}
|
|
68
|
+
- auth: {schemes: {basic: basic}}
|
|
69
|
+
- name: teams
|
|
70
|
+
type: openapi
|
|
71
|
+
path: contracts/teams.json
|
|
72
|
+
upstream: https://dac-static.atlassian.com/platform/teams/swagger-public-api-v1.v3.json
|
|
73
|
+
shape:
|
|
74
|
+
# Documented on api.atlassian.com with service auth; sites serve it at /gateway/api.
|
|
75
|
+
- server: {url: "https://your-site.atlassian.net", prefix: /gateway/api}
|
|
76
|
+
- group: {operations: {"*": teams, "*_members": members, "*external*": external}}
|
|
77
|
+
- auth: {schemes: {basic: basic}}
|
|
78
|
+
shape:
|
|
79
|
+
- auth: {schemes: {session: {custom: "Browser sign-in"}}, alternative: true}
|
|
80
|
+
cli:
|
|
81
|
+
env_prefix: ATLASSIAN
|
|
82
|
+
previous_programs: [codapact-jira, codapact-confluence]
|
|
83
|
+
extensions: ["codapact_atlassian._docformat:extension"]
|
|
84
|
+
skill: {path: skills/codapact-atlassian}
|
|
85
|
+
auth:
|
|
86
|
+
basic:
|
|
87
|
+
check: get_current_user
|
|
88
|
+
labels: {username: Atlassian email, secret: API token} # not the account password
|
|
89
|
+
docs: >-
|
|
90
|
+
Use your Atlassian account email as the username and an API token as the password
|
|
91
|
+
(create one at https://id.atlassian.com/manage-profile/security/api-tokens).
|
|
92
|
+
session:
|
|
93
|
+
check: get_current_user
|
|
94
|
+
docs: >-
|
|
95
|
+
For sites where API tokens are disabled: signs in through a browser window and
|
|
96
|
+
sends the session cookies.
|
|
97
|
+
browser:
|
|
98
|
+
login_url: "{base_url}/jira"
|
|
99
|
+
cookies: [tenant.session.token]
|
|
100
|
+
headers: {X-Atlassian-Token: no-check}
|
|
101
|
+
signin_hosts: ["id.atlassian.com", "*.okta.com"]
|
|
102
|
+
# Atlassian's sign-in edge refuses passwords typed by automation (see README), so
|
|
103
|
+
# the person always types it in the window; renewal reuses the session headlessly.
|
|
104
|
+
password_entry: person
|
|
105
|
+
default_persona: jira
|
|
106
|
+
personas:
|
|
107
|
+
jira:
|
|
108
|
+
description: Everyday Jira work - issues, comments, JQL search, transitions, worklogs, attachments, links, filters
|
|
109
|
+
include:
|
|
110
|
+
- {namespace: jira.issues}
|
|
111
|
+
- {namespace: jira.issue_comments}
|
|
112
|
+
- {namespace: jira.issue_search}
|
|
113
|
+
- {namespace: jira.issue_attachments}
|
|
114
|
+
- {namespace: jira.issue_links}
|
|
115
|
+
- {namespace: jira.issue_remote_links}
|
|
116
|
+
- {namespace: jira.issue_watchers}
|
|
117
|
+
- {namespace: jira.issue_votes}
|
|
118
|
+
- {namespace: jira.issue_worklogs}
|
|
119
|
+
- {namespace: jira.jql}
|
|
120
|
+
- {namespace: jira.labels}
|
|
121
|
+
- {namespace: jira.myself}
|
|
122
|
+
- {namespace: jira.filters}
|
|
123
|
+
- {namespace: jira.user_search}
|
|
124
|
+
- {namespace: jira.projects, read_only: true}
|
|
125
|
+
- {namespace: jira.project_components, read_only: true}
|
|
126
|
+
- {namespace: jira.project_versions, read_only: true}
|
|
127
|
+
- {namespace: jira.issue_types, read_only: true}
|
|
128
|
+
- {namespace: jira.issue_link_types, read_only: true}
|
|
129
|
+
- {namespace: jira.issue_priorities, read_only: true}
|
|
130
|
+
- {namespace: jira.issue_resolutions, read_only: true}
|
|
131
|
+
- {namespace: jira.issue_fields, read_only: true}
|
|
132
|
+
- {namespace: jira.status, read_only: true}
|
|
133
|
+
- {namespace: jira.users, read_only: true}
|
|
134
|
+
agile:
|
|
135
|
+
description: Jira Software boards, sprints, backlogs and epics
|
|
136
|
+
include: [{namespace: "agile.*"}]
|
|
137
|
+
service-desk:
|
|
138
|
+
description: Jira Service Management requests, queues, customers, organizations and knowledge base
|
|
139
|
+
include: [{namespace: "service_desk.*"}, {namespace: service_desk}]
|
|
140
|
+
confluence:
|
|
141
|
+
description: Confluence pages, blog posts, spaces, comments, attachments, labels and CQL search
|
|
142
|
+
include: [{namespace: "confluence.*"}]
|
|
143
|
+
exclude:
|
|
144
|
+
- {namespace: confluence.admin_key}
|
|
145
|
+
- {namespace: confluence.classification_level}
|
|
146
|
+
- {namespace: confluence.data_policies}
|
|
147
|
+
- {namespace: confluence.redactions}
|
|
148
|
+
- {namespace: confluence.space_permission_transition}
|
|
149
|
+
- {namespace: confluence.app_properties}
|
|
150
|
+
jira-admin:
|
|
151
|
+
description: Jira site and project administration - schemes, workflows, fields, screens, permissions
|
|
152
|
+
include: [{namespace: "jira.*"}]
|
|
153
|
+
teams:
|
|
154
|
+
description: Atlassian Teams - teams and their members in your organization
|
|
155
|
+
include: [{namespace: "teams.*"}]
|
|
156
|
+
readme:
|
|
157
|
+
name: Atlassian Cloud
|
|
158
|
+
docs: https://developer.atlassian.com/cloud/
|
|
159
|
+
repository: mikejhill/codapact-atlassian
|
|
160
|
+
examples:
|
|
161
|
+
- "personas"
|
|
162
|
+
- "jira issues get --issue-id-or-key PROJ-1 --query fields.description"
|
|
163
|
+
- "jira issue-search search-issues --jql 'project = PROJ ORDER BY created DESC' --fields summary,status"
|
|
164
|
+
- "jira issue-comments add-comment --issue-id-or-key PROJ-1 --markdown 'Deployed :white_check_mark:'"
|
|
165
|
+
- "--persona agile agile board list-all-boards"
|
|
166
|
+
- "--persona confluence confluence page get --id 123456"
|
|
167
|
+
sections:
|
|
168
|
+
- title: Personas
|
|
169
|
+
body: |
|
|
170
|
+
One CLI covers Jira, Jira Software (Agile), Jira Service Management, Confluence and
|
|
171
|
+
Teams: about a thousand commands. A persona shows the ones for one kind of work and
|
|
172
|
+
hides the rest from help, `describe` and completion. Hidden commands still run.
|
|
173
|
+
|
|
174
|
+
| Persona | Shows |
|
|
175
|
+
| --- | --- |
|
|
176
|
+
| `jira` (default) | Everyday issue work: issues, comments, JQL search, transitions, worklogs, attachments, links, filters, read-only project and field lookups |
|
|
177
|
+
| `agile` | Boards, sprints, backlogs, epics |
|
|
178
|
+
| `service-desk` | Service Management requests, queues, customers, organizations, knowledge base |
|
|
179
|
+
| `confluence` | Pages, blog posts, spaces, comments, attachments, labels, CQL search |
|
|
180
|
+
| `jira-admin` | All of the Jira platform API, administration included |
|
|
181
|
+
| `teams` | Atlassian Teams and their members |
|
|
182
|
+
| `all` | Every command |
|
|
183
|
+
|
|
184
|
+
Choose with `--persona NAME[,NAME]` (for example `--persona jira,agile`),
|
|
185
|
+
`ATLASSIAN_PERSONA`, or `"persona"` in the settings file. `codapact-atlassian personas`
|
|
186
|
+
lists them with their command counts.
|
|
187
|
+
- title: Markdown
|
|
188
|
+
body: |
|
|
189
|
+
Rich text is Markdown both ways. Jira issue descriptions, comments and worklogs, and
|
|
190
|
+
Confluence page, blog post and comment bodies, take `--markdown TEXT|@file|@-`; every
|
|
191
|
+
ADF document in a response comes back as Markdown. `--doc-format adf` (or
|
|
192
|
+
`ATLASSIAN_DOC_FORMAT=adf`) keeps raw ADF. The dialect (panels, status lozenges,
|
|
193
|
+
mentions, emoji, Confluence macros) is documented by `uvx adflux syntax`.
|
|
194
|
+
- title: Sign-in
|
|
195
|
+
body: |
|
|
196
|
+
Set `--base-url` (or `ATLASSIAN_BASE_URL`) to your site, for example
|
|
197
|
+
`https://your-site.atlassian.net`. One sign-in covers every product on the site:
|
|
198
|
+
|
|
199
|
+
- **API token (preferred):** `codapact-atlassian auth login --scheme basic` with your
|
|
200
|
+
Atlassian email and a token from
|
|
201
|
+
https://id.atlassian.com/manage-profile/security/api-tokens.
|
|
202
|
+
- **Browser sign-in, where API tokens are disabled:** `codapact-atlassian auth login
|
|
203
|
+
--scheme session` opens a window. The CLI fills in your email; you type your
|
|
204
|
+
password and any second factor yourself. Needs Chrome, Edge or
|
|
205
|
+
`playwright install chromium`.
|
|
206
|
+
|
|
207
|
+
Logins saved by `codapact-jira` or `codapact-confluence` keep working.
|
|
208
|
+
- title: Coming from codapact-jira or codapact-confluence
|
|
209
|
+
body: |
|
|
210
|
+
Commands gain one word naming the product: `codapact-jira issues get` is now
|
|
211
|
+
`codapact-atlassian jira issues get`, and `codapact-confluence page get` is
|
|
212
|
+
`codapact-atlassian confluence page get`. Saved logins, profiles and the settings file
|
|
213
|
+
carry over.
|
|
214
|
+
targets:
|
|
215
|
+
- {name: python, output: gen/python, options: {package: codapact_atlassian, distribution: codapact-atlassian, include: {_docformat.py: handlers/docformat.py}}}
|
|
216
|
+
- {name: python-cli, output: gen/python}
|
|
217
|
+
- {name: python-readme, output: .}
|