MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / set

Method set

git_PR/git_PR.ts:106–117  ·  view source on GitHub ↗
(key: string, value: string)

Source from the content-addressed store, hash-verified

104 static async set(key: string, value: string): Promise<boolean> {
105 await this.init();
106 if (!this.db) return false;
107 try {
108 this.db.data[key] = value;
109 await this.db.write();
110 return true;
111 } catch (error) {
112 console.error(`[git] 设置配置失败 ${key}:`, error);
113 return false;
114 }
115 }
116}
117
118// 统一创建 GitHub API 客户端
119async function getApi() {
120 const baseURL = await ConfigManager.get(CONFIG_KEYS.API_BASE_URL);

Callers 1

handleLoginMethod · 0.45

Calls 3

initMethod · 0.95
writeMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected