Created
January 18, 2016 21:40
-
-
Save codegoalie/c7429e56441eff6a52e2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
# This script takes story ID and type then a branch subname. | |
# It will use goutrack to mark the story as in progress and create a new branch | |
# in the current directory off the current branch with the format: | |
# <type>/<ID>-<subname> | |
while [[ $# > 1 ]] | |
do | |
key="$1" | |
case $key in | |
-s|--story) | |
STORY_ID="$2" | |
shift # past argument | |
;; | |
-t|--type) | |
TYPE="$2" | |
shift # past argument | |
;; | |
-b|--branch) | |
BRANCH_NAME="$2" | |
shift # past argument | |
;; | |
*) | |
# unknown option | |
;; | |
esac | |
shift # past argument or value | |
done | |
# echo STORY_ID = "${STORY_ID}" | |
# echo TYPE = "${TYPE}" | |
# echo BRANCH_NAME = "${BRANCH_NAME}" | |
goutrack c ${STORY_ID} "Assignee: me In Progress" | |
git checkout -b "${TYPE}s/${STORY_ID}-${BRANCH_NAME}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
An example usage of this is: