add create trello card to gitcopy
This commit is contained in:
parent
2c3254c0a3
commit
86ec34cfd5
@ -132,22 +132,28 @@ function init_db() {
|
|||||||
|
|
||||||
function gitcopy() {
|
function gitcopy() {
|
||||||
n=1
|
n=1
|
||||||
while getopts "c:n:" o; do
|
while getopts "c:n:t:" o; do
|
||||||
case "${o}" in
|
case "${o}" in
|
||||||
c)
|
c)
|
||||||
commit=${OPTARG}
|
commit=${OPTARG}
|
||||||
;;
|
;;
|
||||||
n)
|
n)
|
||||||
n=${OPTARG}
|
n=${OPTARG}
|
||||||
;;
|
;;
|
||||||
*)
|
t)
|
||||||
usage
|
trelloCardName=${OPTARG}
|
||||||
;;
|
;;
|
||||||
esac
|
*)
|
||||||
|
usage
|
||||||
|
;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
prefix=`git remote get-url origin | sed -E 's/git@github.com:/https:\/\/github.com\//g' | sed -E 's/(.*)\.git/\1/'`
|
prefix=`git remote get-url origin | sed -E 's/git@github.com:/https:\/\/github.com\//g' | sed -E 's/(.*)\.git/\1/'`
|
||||||
project_name=`echo $prefix | sed -E 's/.*\/(.*)/\1/'`
|
project_name=`echo $prefix | sed -E 's/.*\/(.*)/\1/'`
|
||||||
git log $commit --pretty="* [$project_name]($prefix/commit/%H) %an: **%s**" | head -n $n | tee >(pbcopy)
|
git log $commit --pretty="* [$project_name]($prefix/commit/%H) %an: **%s**" | head -n $n | tee >(pbcopy)
|
||||||
|
if [[ "$trelloCardName" != '' ]]; then
|
||||||
|
ruby ~/Projects/rallets-hub/bin/create_trello_todo_card.rb -n $trelloCardName -d "$(pbpaste)"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function h() {
|
function h() {
|
||||||
|
Loading…
Reference in New Issue
Block a user