I'm trying go-jira, but there is also jira-cli in Python.
I've generated an API token at https://id.atlassian.com/manage-profile/security/api-tokens and pasted it in my password store:
$ pass edit jira/smart-token
I've configured go-jira (in particular to use pass
):
$ cat ~/.jira.d/config.yml
endpoint: https://smartjira.atlassian.net
user: [email protected]
password-source: pass
password-name: jira/smart-token
(I've later changed user
to login
, not sure this makes any difference.)
Then I can check I can authenticate (otherwise this receives a 401):
$ jira session
name: thu
self: https://smartjira.atlassian.net/rest/api/latest/user?username=thu
$ jira ls --project DSI --template table | less -S
The default template triggers the strict GDPR error message about using the
username
field.
Use e.g. jira create -p DSI
, but in the given template, use emailAddress
intead of name
. It seems it is also possible to use id
.
$ jira create -p DSI
$ jira in-progress DSI-90
I got automatically assigned to the issue. I guess this is because the DSI
project is configured that way, not because of go-jira.
Weirdly I can't jira todo
the issue after, but I can in the web interface.
$ jira view DSI-90
$ jira comment DSI-90
$ jira done DSI-90