Skip to content

Commit 08d7937

Browse files
committed
BF: pavlovia URL checking was only working on https URLs
They have this format: https://gitlab.pavlovia.org/NameSpace/Name.git Should also be able to work with ssh format: git@gitlab.pavlovia.org:NameSpace/Name.git
1 parent 3546e12 commit 08d7937

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

psychopy/projects/pavlovia.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,8 +1064,14 @@ def getProject(filename):
10641064
proj = None
10651065
for remote in localRepo.remotes:
10661066
for url in remote.urls:
1067-
if "gitlab.pavlovia.org/" in url:
1068-
namespaceName = url.split('gitlab.pavlovia.org/')[1]
1067+
if "gitlab.pavlovia.org" in url:
1068+
# could be 'https://gitlab.pavlovia.org/NameSpace/Name.git'
1069+
# or may be 'git@gitlab.pavlovia.org:NameSpace/Name.git'
1070+
namespaceName = url.split('gitlab.pavlovia.org')[1]
1071+
# remove the first char (: or /)
1072+
if namespaceName[0] in ['/', ':']:
1073+
namespaceName = namespaceName[1:]
1074+
# remove the .git at the end if present
10691075
namespaceName = namespaceName.replace('.git', '')
10701076
pavSession = getCurrentSession()
10711077
if not pavSession.user:

0 commit comments

Comments
 (0)