- Download latest jira-cli
- Install with brew (see repo for other install options)
brew tap ankitpokhrel/jira-cli brew install jira-cli
- Get your JIRA API token from JIRA cloud
- Export the token to your environment
- Run
jira init
to setup - Use defined aliases to simplify commands
Last active
September 13, 2022 16:10
-
-
Save emmanuelnk/4a72412ee5fe0a124313354c2a44c687 to your computer and use it in GitHub Desktop.
Aliases for jira-cli with Jira Cloud and ZSH
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export JIRA_API_TOKEN=XXXXXXXXXXXXXXXXXXX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#------------------ | |
# jira-cli | |
#------------------ | |
alias jic='jira issue create' | |
# Pass in a user to see their issues. Defaults to current user | |
function jil () { | |
jira issue list -q"status not in (Done, Rejected)" -a${1:-$(jira me)} | |
} | |
# Assign the ticket number passed in as an argument to me | |
# e.g. `jiam RUN-12` | |
function jiam () { | |
jira issue assign $1 $(jira me) | |
} | |
# Open interactive interface to assign the passed in ticket number | |
# e.g. `jia TKT-12` will open a prompt for you to search for users | |
function jia () { | |
jira issue assign $1 | |
} | |
# Open interactive interface to move the passed in ticket's status | |
# e.g. jim TKT-12 | |
function jim () { | |
jira issue move $1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment