diff --git a/scripts/cherry_pick_pull.sh b/scripts/cherry_pick_pull.sh index c2d0ccac59..7b4e143117 100755 --- a/scripts/cherry_pick_pull.sh +++ b/scripts/cherry_pick_pull.sh @@ -46,8 +46,8 @@ declare -r REBASEMAGIC="${REPO_ROOT}/.git/rebase-apply" DRY_RUN=${DRY_RUN:-""} UPSTREAM_REMOTE=${UPSTREAM_REMOTE:-upstream} FORK_REMOTE=${FORK_REMOTE:-origin} -MAIN_REPO_ORG=${MAIN_REPO_ORG:-$(git_remote_get_url "$UPSTREAM_REMOTE" | awk -F'github.com' '{print $2}' | awk -F'/' 'NR==1{print $2}')} -MAIN_REPO_NAME=${MAIN_REPO_NAME:-$(git_remote_get_url "$UPSTREAM_REMOTE" | awk -F'github.com' '{print $2}' | awk -F'/' 'NR==1{print $3}')} +MAIN_REPO_ORG=${MAIN_REPO_ORG:-$(git_remote_get_url "$UPSTREAM_REMOTE" | awk -F'github.com' '{print $2}' | awk -F'[./]' 'NR==1{print $2}')} +MAIN_REPO_NAME=${MAIN_REPO_NAME:-$(git_remote_get_url "$UPSTREAM_REMOTE" | awk -F'github.com' '{print $2}' | awk -F'[./]' 'NR==1{print $3}')} if [[ -z ${GITHUB_USER:-} ]]; then echo "Please export GITHUB_USER= (or GH organization, if that's where your fork lives)"