feat: support PROXY_HOST/PROXY_PORT

This commit is contained in:
Klesh Wong 2022-12-12 21:43:03 +08:00
parent 7f2c301407
commit 3ee826db74

View File

@ -4,6 +4,10 @@ set -e
# github pr helper # github pr helper
# push current branch to ORIGIN and create a PR on UPSTREAM # push current branch to ORIGIN and create a PR on UPSTREAM
# UPSTREAM must be a https github url # UPSTREAM must be a https github url
if [ -n "$PROXY_HOST" ] && [ -n "$PROXY_PORT" ]; then
export HTTPS_PROXY=http://$PROXY_HOST:$PROXY_PORT
fi
echo $HTTPS_PROXY
BRANCH=$(git branch --show-current) BRANCH=$(git branch --show-current)
UPSTREAM_BRANCH=$(git remote show upstream | grep -oP 'HEAD branch: \K\w+') UPSTREAM_BRANCH=$(git remote show upstream | grep -oP 'HEAD branch: \K\w+')