Skip to content

Commit

Permalink
chore: Update logging level to DEBUG in command.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yangbobo2021 committed May 22, 2024
1 parent 813ae0f commit 24bd312
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
2 changes: 1 addition & 1 deletion merico/pr/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def close(self):
logger.remove(None)
logger.add(
CustomOutput(),
level=logging.INFO,
level=logging.DEBUG,
format="{message}",
colorize=False,
filter=inv_analytics_filter,
Expand Down
32 changes: 30 additions & 2 deletions merico/pr/config_util.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import json
import os

from lib.chatmark import TextEditor
from lib.chatmark import TextEditor, Radio


cache_repo_types = {}
# 根据PR URL获取不同的仓库管理类型
# 支持的类型有:github gitlab bitbucket bitbucket_server azure codecommit gerrit
def get_repo_type(url):
Expand All @@ -22,8 +23,35 @@ def get_repo_type(url):
return "codecommit"
elif "gerrit" in url:
return "gerrit"
elif url in cache_repo_types:
return cache_repo_types[url]
else:
return ""
radio = Radio(
[
"github",
"gitlab",
"bitbucket",
"bitbucket_server",
"azure",
"codecommit",
"gerrit"
],
)
radio.render()
if radio.selection is not None:
return ""

rtype = [
"github",
"gitlab",
"bitbucket",
"bitbucket_server",
"azure",
"codecommit",
"gerrit"
][radio.selection]
cache_repo_types[url] = rtype
return rtype


def read_github_token():
Expand Down

0 comments on commit 24bd312

Please sign in to comment.