From 2340af8c9d66364c44cfb7c393ae964cb796b1d3 Mon Sep 17 00:00:00 2001 From: Adolfo Perez Alvarez Date: Tue, 13 Feb 2024 16:27:01 +0100 Subject: [PATCH] Push branch; update ticket urls --- g | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/g b/g index dc74440..19b81fc 100755 --- a/g +++ b/g @@ -1,13 +1,15 @@ #!/usr/bin/env ksh if [[ $1 = "pc" || ( $1 = "pr" && $2 = "create" ) ]] then + remote=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null | cut -d/ -f1) + git push --set-upstream ${remote:-origin} $(git branch --show-current) tmp=$(mktemp /tmp/g.XXXXXXXXXXX.md) if [[ -f ~/.g.template ]] then lps=$(git show --pretty='format:%s' --no-patch | cut -d' ' -f1) if [[ ! -z $lps ]] then - url="https://issues.liferay.com/browse/"$lps + url="https://liferay.atlassian.net/browse/"$lps sed -e "s/{lps}/$lps/g" -e "s,{url},$url," <~/.g.template >$tmp fi fi