Last active
March 9, 2019 16:03
-
-
Save limelights/7ca5c656cc3579490e8481871650dc19 to your computer and use it in GitHub Desktop.
A super simple ticketing system
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
| function ticket() { | |
| mkdir -p tickets/resolved | |
| if [ $1 = 'resolve' ]; then | |
| mv ./tickets/$2.md ./tickets/resolved/resolved-$2.md | |
| git add .; echo "[$2] $3" | git commit -F - | |
| elif [ $1 = 'list' ]; then | |
| ls ./tickets/ | |
| elif [ ! -z "$1" ]; then | |
| echo $(date +"%Y%m%d-%H%M%S") "${@:2}" >> "./tickets/$1-$(ls -lR tickets/**/*.md | grep $1 | wc -l | awk '{$1=$1};1').md" | |
| fi | |
| } | |
| Usage: | |
| To create a new ticket in your repo: `ticket ticket-name "As a human I want more cowbell!"` | |
| The ticket system automatically increments based on number of same category tickets. | |
| To resolve the same ticket `ticket resolve ticket-name-0 "Optional commit message"` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment