fix: org name should be dynamically detected
This commit is contained in:
parent
c35040650c
commit
eab3612862
3
bin/gpr
3
bin/gpr
|
@ -5,6 +5,7 @@
|
|||
# UPSTREAM must be a https github url
|
||||
|
||||
BRANCH=$(git branch --show-current)
|
||||
UPSTREAM_BRANCH=$(git remote show upstream | grep -oP 'HEAD branch: \K\w+')
|
||||
ORIGIN_URL=$(git remote get-url origin)
|
||||
case "$ORIGIN_URL" in
|
||||
git@github.com:*)
|
||||
|
@ -17,7 +18,7 @@ UPSTREAM_URL=$(echo "$UPSTREAM_URL" | sed 's/.git$//')
|
|||
echo ORIGIN_ORG: $ORIGIN_ORG
|
||||
echo UPSTREAM_URL: $UPSTREAM_URL
|
||||
git push -f -u origin $BRANCH
|
||||
x-open "$UPSTREAM_URL/compare/main...merico-dev:$BRANCH?expand=1"
|
||||
x-open "$UPSTREAM_URL/compare/$UPSTREAM_BRANCH...$ORIGIN_ORG:$BRANCH?expand=1"
|
||||
sleep 2
|
||||
command -v awesome-client && awesome-client '
|
||||
local awful = require("awful")
|
||||
|
|
Loading…
Reference in New Issue
Block a user