Skip to content

Commit 2af2f74

Browse files
authored
Merge branch 'main' into alert-autofix-12
2 parents 0bf002b + 48dd398 commit 2af2f74

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/test-mlc-core-actions.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
name: MLC core actions test
2+
permissions:
3+
contents: read
24

35
on:
46
pull_request:

mlc/repo_action.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from . import utils
99
from .logger import logger
1010
from urllib.parse import urlparse
11+
1112
class RepoAction(Action):
1213
"""
1314
####################################################################################################################
@@ -85,7 +86,8 @@ def add(self, run_args):
8586
if not os.path.exists(i_repo_path):
8687
#check if its an URL
8788
if utils.is_valid_url(i_repo_path):
88-
if "github.com" in i_repo_path:
89+
parsed = urlparse(i_repo_path)
90+
if parsed.hostname == "github.com":
8991
res = self.github_url_to_user_repo_format(i_repo_path)
9092
if res['return'] > 0:
9193
return res

0 commit comments

Comments
 (0)