make trello_action.rb to push commits info into 纳斯达克 with git user and commits presented
This commit is contained in:
parent
d6c2ef8cfe
commit
ffb477b810
@ -206,7 +206,6 @@ function gitr() {
|
|||||||
|
|
||||||
function gitcopy() {
|
function gitcopy() {
|
||||||
n=1
|
n=1
|
||||||
trelloCardName=`git log $commit --pretty="✔️ %s" | head -n $n`
|
|
||||||
while getopts "c:n:t" o; do
|
while getopts "c:n:t" o; do
|
||||||
case "${o}" in
|
case "${o}" in
|
||||||
c)
|
c)
|
||||||
@ -225,6 +224,7 @@ function gitcopy() {
|
|||||||
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/'`
|
||||||
|
trelloCardName=`git log$commit -n $n --pretty="✔️ %s"`
|
||||||
commits=`git log $commit -n $n --stat --pretty="
|
commits=`git log $commit -n $n --stat --pretty="
|
||||||
* [$project_name]($prefix/commit/%H) %an: **%s**" | sed 's/^[^*]/> /'`
|
* [$project_name]($prefix/commit/%H) %an: **%s**" | sed 's/^[^*]/> /'`
|
||||||
echo $commits
|
echo $commits
|
||||||
@ -233,7 +233,7 @@ function gitcopy() {
|
|||||||
echo $commits | pbcopy
|
echo $commits | pbcopy
|
||||||
fi
|
fi
|
||||||
if [[ "$trelloCardName" != '' ]]; then
|
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
|
fi
|
||||||
}
|
}
|
||||||
function k() {
|
function k() {
|
||||||
|
Loading…
Reference in New Issue
Block a user