node.jsbrew(optional)
- run
npm install -g git-stats-importer jira-cmd git-statsin your terminalgit-stats-importeris used to import git history intogit-statsgit-statsis used to show your contribution graphjira-cmdis used to show a specific agile board
- you need to setup
jira-cmdfor first use. run the commandjirain the terminal and insert the following information:$ jira Jira URL: xxxxxx Username: xxxxxx Password: xxxxxx Information stored!
There are 3 commands that need to run to see the data:
git-stats-importer --find-repos <repo_directory_path> -e <user_email> &>/dev/nullThis will go over the repo's git history and search for the<user_email>commits (can add more than one). the output is obvuscated using&>/dev/null. to see output, remove it.git-stats- display the commit graph should have all the data from git-stats-importerjira sprint -r <board_name>- show bugs of specific agile board. if you don't have a board for the issues you want to display, you can create one using the following method- go to jira, click on
IssuesandSearch for issues - add your search term, and click
Save as. name your search. - on the header, click on
Boards, and thenView all boards. - click on
Create boardin the top right corner. In the modal, selectCreate a Scrum board. selectBoard from an existing Saved Filterand click Next - give the board an easy name, and search for the saved search we created. click on Create board.
- Now that you have a board, you can run the command with the board name
jira sprint -r "team omicron bugs"
- go to jira, click on
Here's a little snippet to show the contribution graph, jira board, and status of docker containers
###COLOR DEFINITIONS###
BLACK='\e[0;30m'
BLUE='\e[0;34m'
GREEN='\e[0;32m'
CYAN='\e[0;36m'
RED='\e[0;31m'
PURPLE='\e[0;35m'
BROWN='\e[0;33m'
LIGHTGRAY='\e[0;37m'
DARKGRAY='\e[1;30m'
LIGHTBLUE='\e[1;34m'
LIGHTGREEN='\e[1;32m'
LIGHTCYAN='\e[1;36m'
LIGHTRED='\e[1;31m'
MAGENTA='\e[1;35m'
YELLOW='\e[1;33m'
LIGHTYELLOW='\e[0;33m'
WHITE='\e[1;37m'
NC='\e[0m' # No Color
###WELCOME SCREEN###
# update commit data for csp-ui
git-stats-importer --find-repos ~/Development/csp-ui -e nkalman@vmware.com &>/dev/null
###
echo -ne "Today is, "; date
echo;
echo -ne "${NC}~ CSP CONTRIBUTIONS FOR nkalman@vmware.com ~\n==========================================\n" ; git-stats ; jira sprint -r "team omicron bugs" ;
echo -ne "DOCKER STATUS: ${PURPLE}"
echo;
echo -ne ""; docker ps -a
echo; echo;
echo -ne "${NC}";
On my terminal splash screen, I also install these dependencies: brew install toilet fortune cowsay
toilet- shows large text titlesfortune- shows a random quote or jokecowsay- prints a cow in ASCII that says the input you give it
if you run that command, you can use my full splash screen:
###WELCOME SCREEN###
# update commit data for csp-ui
git-stats-importer --find-repos ~/Development/csp-ui -e nkalman@vmware.com &>/dev/null
###
toilet -f pagga "Hello, $USER"
echo -ne "Today is, "; date
echo;
echo -ne "${NC}~ CSP CONTRIBUTIONS FOR nkalman@vmware.com ~\n==========================================\n" ; git-stats ; jira sprint -r "team omicron bugs" ;
echo -ne "DOCKER STATUS: ${PURPLE}"
echo;
echo -ne ""; docker ps -a
echo; echo;
echo -ne "${RED}"; fortune ;
echo -ne "${NC}";
echo;
echo -ne "${NC}";
You can also show relevant data from GitHub if you're interested. for that, you can install the following tools:
npm install -g ghcal- same contribution graph, happening directly with GitHub databrew install ghi- show issues from a GitHub repo
- including contributions for your user on github:
ghcal -u thatkookooguy(supports most of the same parameters asgit-stats. run with-hto check) - showing issues related to open pull requests on
vmware/clarity:ghi list -f all -p -N greenkeeper -S updated -s open -- vmware/clarity
- you can change the contribution's graph theme using
--lightto make it brighter - you can show a pie chart of contributions by emails using
git-stats --authors. Notice this only works for emails you scanned usinggit-stats-importer jira-cmdhave options to actually do commands in jira:$ jira -h Usage: jira [options] [command] Commands: ls [options] List my issues start <issue> Start working on an issue. stop <issue> Stop working on an issue. review <issue> [assignee] Mark issue as being reviewed [by assignee(optional)]. done [options] <issue> Mark issue as finished. invalid <issue> Mark issue as finished. running List issues in progress. jql [options] [query] Run JQL query link <from> <to> link issues search <term> Find issues. assign <issue> [user] Assign an issue to <user>. Provide only issue# to assign to me watch <issue> [user] Watch an issue to <user>. Provide only issue# to watch to me comment <issue> [text] Comment an issue. show [options] <issue> Show info about an issue open <issue> Open an issue in a browser worklog <issue> Show worklog about an issue worklogadd [options] <issue> <timeSpent> [comment] Log work for an issue create [project[-issue]] Create an issue or a sub-task new [options] [key] Create an issue or a sub-task config [options] Change configuration sprint [options] Works with sprint boards With no arguments, displays all rapid boards With -r argument, attempt to find a single rapid board and display its active sprints With both -r and -s arguments attempt to get a single rapidboard/ sprint and show its issues. If a single sprint board isnt found, show all matching sprint boards Options: -h, --help output usage information -V, --version output the version numberghican show the body of the issues\pr using the--verboseflag