File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -199,12 +199,18 @@ def find(self, run_args):
199
199
repo_uid = repo_split [1 ]
200
200
elif "@" in repo :
201
201
repo_name = repo
202
- elif "github.com" in repo :
203
- result = self .github_url_to_user_repo_format (repo )
204
- if result ["return" ] == 0 :
205
- repo_name = result ["value" ]
206
- else :
207
- return result
202
+ else :
203
+ # Check for valid github.com URL using urlparse
204
+ try :
205
+ parsed = urlparse (repo )
206
+ except Exception :
207
+ parsed = None
208
+ if parsed and parsed .scheme in ("http" , "https" ) and parsed .hostname == "github.com" :
209
+ result = self .github_url_to_user_repo_format (repo )
210
+ if result ["return" ] == 0 :
211
+ repo_name = result ["value" ]
212
+ else :
213
+ return result
208
214
209
215
# Check if repo_name exists in repos.json
210
216
matched_repo_path = None
You can’t perform that action at this time.
0 commit comments