mirror of
https://git.yoctoproject.org/poky
synced 2026-04-04 23:02:22 +02:00
create-pull-request: add GitHub remote support
(From OE-Core rev: e504b149fe2f057e38c19642b3d71bf43be2d62a) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
5f9f2188b5
commit
b131ca1834
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user