Created
December 17, 2010 00:16
-
-
Save subtleGradient/744260 to your computer and use it in GitHub Desktop.
Jira CLI with git config support! + stuff
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
#!/usr/bin/env bash | |
# Author: Thomas Aylott <[email protected]> | |
# Usage:| | |
# git-jira getIssue | |
# git-jira getComments | |
# Notes:| | |
# This expects you to use branch names like "thomas/HUE-123-Make-Things-Awesomer" or "tom-HUE-321-code-stuff" | |
BRANCH_NAME="$(git symbolic-ref HEAD|sed 's/refs\/heads\///')" | |
TICKET_ID="$(echo "$BRANCH_NAME"|sed -E 's/^.*[/-]([A-Z]+-[0-9]+).*$/\1/')" | |
jira --issue "$TICKET_ID" --action "$@" |
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
#!/usr/bin/env bash | |
BRANCH_NAME="$(git symbolic-ref HEAD|sed 's/refs\/heads\///')" | |
TICKET_ID="$(echo "$BRANCH_NAME"|sed -E 's/^.*[/-]([A-Z]+-[0-9]+).*$/\1/')" | |
open "$(git config jira.server)browse/$TICKET_ID" |
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
#!/bin/bash | |
# Comments | |
# - Customize for your installation, for instance you might want to add default parameters like the following: | |
# java -jar release/jira-cli-1.5.0.jar --server http://my-server --user automation --password automation "$@" | |
java -jar /usr/local/jira-cli-1.5.0/release/jira-cli-1.5.0.jar --server $(git config jira.server) --user $(git config jira.user) --password $(git config jira.password) "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Then setup your git repo's Jira config without leaking your password all over the place.