Hopefully you have nodejs installed already.
npm install -g packetloop/jiraSet following ENV vars (add these to your .bashrc and change whatever needed)
export JIRA_URL=url
export JIRA_TOKEN=user:pass
export GITLAB_URL=url
export GITLAB_TOKEN=token
export GITLAB_PING_FRONTEND="@list @of @users @to @ping @on @each @review"
#export GITLAB_PING_DEFAULT="$GITLAB_PING_FRONTEND"
export GITLAB_PING_DEFAULT="Hello, @everyone!"jira start AB-1234
# do something, commit, push. This will set description to $GITLAB_PING_FRONTEND
jira review AB-1234
# you can specify GITLAB_PING_FRONTEND group this way
jira review AB-1234 frontend
# to simply fetch JIRA summary
jira summary AB-1234There is a little dynamic contextual help on available commands and their basic syntax
$ jira
Usage:
cache:
jira cache <action>
Available actions:
clear
size
path
review:
jira review <issue key> [<ping group>]
start:
jira start <issue key>
summary:
jira summary <issue key>
23:59 $ jira summary
[Error: Issue key must be specified]
Usage
jira summary <issue key>- Make a call to jira to resolve ticket summary:
Awesome feature - Dasherize it, create a new branch and switch to it:
feature/AB-1234-Awesome-feature
- Make a call to jira to resolve ticket summary:
Awesome feature - Get origin url from GIT and extract project namespace
group/project - Search GITLAB for project ID by namespace
- Take your token and submit merge request
feature/AB-1234-Awesome-feature-->develop - Ping default user group (put
GITLAB_PING_DEFAULTto merge request description). To pingGITLAB_PING_FRONTENDgroup, usereview AB-1234 frontend