diff options
-rwxr-xr-x | scripts/create-pull-request | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/scripts/create-pull-request b/scripts/create-pull-request index 8f7f767b98..429421b24e 100755 --- a/scripts/create-pull-request +++ b/scripts/create-pull-request | |||
@@ -65,7 +65,19 @@ while getopts "b:hi:m:o:p:r:s:u:" OPT; do | |||
65 | echo "ERROR: git config failed to find a url for '$REMOTE'" | 65 | echo "ERROR: git config failed to find a url for '$REMOTE'" |
66 | exit 1 | 66 | exit 1 |
67 | fi | 67 | fi |
68 | REMOTE_REPO=$(echo $REMOTE_URL | sed "s#.*/\(.*\)#\1#") | 68 | |
69 | # Rewrite known private URLs to public URLs | ||
70 | # Determine the repository name for use in the WEB_URL later | ||
71 | case "$REMOTE_URL" in | ||
72 | ssh://git@git.pokylinux.org*) | ||
73 | REMOTE_REPO=$(echo $REMOTE_URL | sed "s#.*/\(.*\)#\1#") | ||
74 | REMOTE_URL=${REMOTE_URL/'ssh://git@'/'git://'} | ||
75 | ;; | ||
76 | ssh://git@git.yoctoproject.org*) | ||
77 | REMOTE_REPO=$(echo $REMOTE_URL | sed "s#.*/\(.*\)#\1#") | ||
78 | REMOTE_URL=${REMOTE_URL/"ssh://git@"/"git://"} | ||
79 | ;; | ||
80 | esac | ||
69 | # The .git suffix is optional in the URL, drop in for the REPO | 81 | # The .git suffix is optional in the URL, drop in for the REPO |
70 | REMOTE_REPO=${REMOTE_REPO%.git} | 82 | REMOTE_REPO=${REMOTE_REPO%.git} |
71 | ;; | 83 | ;; |