Skip to content

Commit

Permalink
Refactor config_util.py to use a list for the supported repository types
Browse files Browse the repository at this point in the history
  • Loading branch information
yangbobo2021 committed May 22, 2024
1 parent 5738242 commit a15f1a0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion merico/pr/config_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@
# 支持的类型有:github gitlab bitbucket bitbucket_server azure codecommit gerrit
def get_repo_type(url):
# 根据URL的特征判断仓库管理类型
support_repo_list = ["github", "gitlab", "bitbucket", "bitbucket_server", "azure", "codecommit", "gerrit"]
support_repo_list = [
"github",
"gitlab",
"bitbucket",
"bitbucket_server",
"azure",
"codecommit",
"gerrit",
]
if "github.com" in url:
return "github"
elif "gitlab.com" in url or "gitlab" in url:
Expand Down

0 comments on commit a15f1a0

Please sign in to comment.