MCPcopy Create free account
hub / github.com/chokcoco/iCSS / IssuesFetcher

Class IssuesFetcher

MCP/scripts/fetch-issues.js:13–1343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11const __dirname = path.dirname(__filename);
12
13class IssuesFetcher {
14 constructor() {
15 this.baseURL = 'https://api.github.com/repos/chokcoco/iCSS/issues';
16 this.dbPath = path.join(__dirname, '../data/icss.db');
17 this.dataDir = path.join(__dirname, '../data');
18
19 // 检查 GitHub token
20 this.githubToken = process.env.GITHUB_TOKEN;
21 if (!this.githubToken) {
22 console.warn('⚠️ No GITHUB_TOKEN found in environment variables. API rate limits will be restricted.');
23 }
24
25 // 确保数据目录存在
26 if (!fs.existsSync(this.dataDir)) {
27 fs.mkdirSync(this.dataDir, { recursive: true });
28 }
29
30 // 初始化数据库连接
31 this.db = new Database.Database(this.dbPath, (err) => {
32 if (err) {
33 console.error('❌ Error opening database:', err);
34 process.exit(1);
35 }
36 });
37
38 this.labelCategories = {
39 // 核心技术类标签
40 core_tech: [
41 'CSS Layout', // CSS 布局
42 'CSS Function', // CSS 函数
43 'CSS-Houdini', // CSS Houdini API
44 'CSS Variable', // CSS 变量
45 'CSS 新特性', // CSS 新特性
46 'Modern CSS', // 现代 CSS
47 'CSS-doodle' // CSS-doodle
48 ],
49
50 // 视觉效果类标签
51 visual_effects: [
52 'Background', // 背景效果
53 'Border', // 边框效果
54 'Shadow', // 阴影效果
55 'Shape', // 形状效果
56 '混合模式', // 混合模式
57 '滤镜', // 滤镜效果
58 'clip-path', // 裁剪路径
59 'Mask', // 遮罩效果
60 '3D 效果', // 3D 效果
61 '图片效果', // 图片处理
62 '文字效果', // 文字效果
63 '边框效果' // 边框特效
64 ],
65
66 // 动画类标签
67 animation: [
68 '动效', // 动态效果
69 '动画', // 动画效果
70 '特殊交互' // 特殊交互效果

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected