The instructions on the Go Jira are not so good on how to get started so I have created this guide to get up and running.
For MacOS
brew install go-jira
Once installed you will need a config.yml
in ~/.jira.d
The docs don't explain the basic settings needed for a hosted JIRA platform.
Use the following:
endpoint: https://COMPANY.atlassian.net
user: USERNAME
login: [email protected]
password-source: keyring
project: PROJECTCODE
custom-commands:
- name: mine
help: display issues assigned to me
script: |-
if [ -n "$JIRA_PROJECT" ]; then
# if `project: ...` configured just list the issues for current project
{{jira}} list --template table --query "resolution = unresolved and assignee=currentuser() and project = $JIRA_PROJECT ORDER BY priority asc, created"
else
# otherwise list issues for all project
{{jira}} list --template table --query "resolution = unresolved and assignee=currentuser() ORDER BY priority asc, created"
fi
- name: sprint
help: display issues for active sprint
script: |-
if [ -n "$JIRA_PROJECT" ]; then
# if `project: ...` configured just list the issues for current project
{{jira}} list --template table --query "sprint in openSprints() and type != epic and resolution = unresolved and project=$JIRA_PROJECT ORDER BY rank asc, created"
else
# otherwise list issues for all project
{{jira}} list --template table --query "sprint in openSprints() and type != epic and resolution = unresolved ORDER BY rank asc, created"
fi
I have also pasted some useful custom commands copied from the docs.
You will need a JIRA token and then run:
jira session
Have a look at the project docs for other useful commands but this should get you started.