]> code.ossystems Code Review - openembedded-core.git/commitdiff
create-pull-request: add GitHub remote support
authorOtavio Salvador <otavio@ossystems.com.br>
Sat, 14 May 2011 05:33:53 +0000 (22:33 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 19 May 2011 22:38:21 +0000 (23:38 +0100)
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
scripts/create-pull-request

index 9dbd55a9c04103090b980fc0ae5435645acb7fc0..a9cf6f94f1461cd84137de24c69b476d33607d2d 100755 (executable)
@@ -82,6 +82,10 @@ while getopts "b:chi:m:o:p:r:s:u:" OPT; do
                        REMOTE_REPO=$(echo $REMOTE_URL | sed "s#.*/\(.*\)#\1#")
                        REMOTE_URL=${REMOTE_URL/"ssh://git@"/"git://"}
                        ;;
+               git@github.com:*)
+                       REMOTE_REPO=$(echo $REMOTE_URL | sed 's#.*:\(.*\)\(\.git\)$#\1#')
+                       REMOTE_URL=${REMOTE_URL/"git@github.com:"/"git://github.com/"}
+                       ;;
                esac
                # The .git suffix is optional in the URL, drop in for the REPO
                REMOTE_REPO=${REMOTE_REPO%.git}
@@ -107,6 +111,9 @@ case "$REMOTE_URL" in
        *git.pokylinux.org*)
                WEB_URL="http://git.pokylinux.org/cgit.cgi/$REMOTE_REPO/log/?h=$BRANCH"
                ;;
+       *github.com*)
+               WEB_URL="https://github.com/$REMOTE_REPO/tree/$BRANCH"
+               ;;
 esac
 
 # Perform a sanity test on the web URL. Issue a warning if it is not