From ffb477b81071b37f297b658e6fcd9c1e6d41c2f3 Mon Sep 17 00:00:00 2001 From: hophacker Date: Thu, 15 Aug 2019 12:50:23 +0800 Subject: [PATCH] =?UTF-8?q?make=20trello=5Faction.rb=20to=20push=20commits?= =?UTF-8?q?=20info=20into=20=E7=BA=B3=E6=96=AF=E8=BE=BE=E5=85=8B=20with=20?= =?UTF-8?q?git=20user=20and=20commits=20presented?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zsh/functions.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zsh/functions.zsh b/zsh/functions.zsh index b670ce5..e6ed698 100644 --- a/zsh/functions.zsh +++ b/zsh/functions.zsh @@ -206,7 +206,6 @@ function gitr() { function gitcopy() { n=1 - trelloCardName=`git log $commit --pretty="✔️ %s" | head -n $n` while getopts "c:n:t" o; do case "${o}" in c) @@ -225,6 +224,7 @@ function gitcopy() { done 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/'` + trelloCardName=`git log$commit -n $n --pretty="✔️ %s"` commits=`git log $commit -n $n --stat --pretty=" * [$project_name]($prefix/commit/%H) %an: **%s**" | sed 's/^[^*]/> /'` echo $commits @@ -233,7 +233,7 @@ function gitcopy() { echo $commits | pbcopy fi if [[ "$trelloCardName" != '' ]]; then - ruby ~/Projects/paiyou-hub/bin/trello_action.rb -n $trelloCardName -d "$commits" -l `git config user.name` + ruby ~/Projects/paiyou-hub/bin/trello_action.rb -n $trelloCardName -d "$commits" -u `git config user.name` fi } function k() {