88
99class 配置信息 :
1010 默认配置 : dict [str , Any ] = {
11- "$schema" : "https://duckduckstudio.github.io/yazicbs.github.io/Tools/Sundry/config/schema/1.2 .json" ,
12- "version" : "1.2 " ,
11+ "$schema" : "https://duckduckstudio.github.io/yazicbs.github.io/Tools/Sundry/config/schema/1.3 .json" ,
12+ "version" : "1.3 " ,
1313 "debug" : False ,
1414 "paths" : {
1515 "winget-pkgs" : "" ,
@@ -26,9 +26,13 @@ class 配置信息:
2626 "pr" : {
2727 "maintainer_can_modify" : False ,
2828 "mention_self_when_reviewer" : False
29- }
29+ },
30+ "token" : "glm" ,
3031 },
3132 "tools" : {
33+ "autoremove" : {
34+ "open_in_browser" : False
35+ },
3236 "prune" : {
3337 "remote" : {
3438 "prune_merged_branches" : False ,
@@ -53,6 +57,7 @@ class 配置信息:
5357 "debug" ,
5458 "git.signature" ,
5559 "github.pr.maintainer_can_modify" , "github.pr.mention_self_when_reviewer" ,
60+ "tools.autoremove.open_in_browser" ,
5661 "tools.prune.remote.prune_merged_branches" , "tools.prune.remote.prune_closed_branches" ,
5762 "tools.verify.show_warning_on_non-clean_windows" ,
5863 "cache.validate.schema"
@@ -65,7 +70,7 @@ class 配置信息:
6570 "repos.winget-tools"
6671 ]
6772
68- 最新版本 : str = "1.2 "
73+ 最新版本 : str = "1.3 "
6974
7075 所在位置 : str = os .path .join (os .path .expanduser ("~" ), ".config" , "DuckStudio" , "Sundry" , "config.json" )
7176
@@ -113,6 +118,9 @@ def 验证配置(配置项: str, 配置值: str | bool) -> str | None:
113118 elif (配置项 == "i18n.lang" ) and (配置值 not in ["zh-cn" , "en-us" ]):
114119 return f"不支持的语言 { Fore .BLUE } { 配置值 } { Fore .RESET } "
115120
121+ elif (配置项 == "github.token" ) and (配置值 not in ["glm" , "komac" , "env" ]):
122+ return "未知的 Token 读取源"
123+
116124 else :
117125 return None
118126
0 commit comments