-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.json
More file actions
152 lines (137 loc) · 14.2 KB
/
config.json
File metadata and controls
152 lines (137 loc) · 14.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
{
"prompts": {
"spam_detection": "Analyze this GitHub Issue/PR for spam content:\n\nTitle: {title}\nBody: {body}\nTemplate: {template_analysis}\n{file_changes}\n\nIs this spam or meaningless content?\nSpam indicators:\n- Random characters or keyboard mashing (e.g., 'asdfghjkl', 'qwerty123')\n- Advertisement or promotional content\n- Malicious links or content\n- Completely unrelated to the project\n- Obvious test submissions with no purpose\n- Repeated identical content\n- Content in languages completely unrelated to project context\n\nNote: For Issues, file_changes will be empty. For PRs, it shows actual code changes.\n\nRespond ONLY with:\n- `SPAM` - if spam or meaningless content\n- `NOT_SPAM` - if legitimate content (even if low quality)",
"readme_coverage_check": "Check if this GitHub Issue is EXPLICITLY and COMPLETELY covered in the README or pinned issues:\n\nREADME: {readme_content}\n\nPinned Issues: {pinned_issues_content}\n\nTitle: {issue_title}\nBody: {issue_body}\n\nSTRICT EVALUATION CRITERIA:\n- Is the EXACT same question/issue EXPLICITLY and COMPLETELY addressed?\n- Does the README/pinned issues contain SPECIFIC information that DIRECTLY answers this question?\n- Is there SUFFICIENT detail to fully resolve the issue?\n\nIMPORTANT: \n- Only mark as COVERED if you are 100% certain the exact issue is EXPLICITLY explained with COMPLETE and SUFFICIENT detail\n- DO NOT mark as COVERED for partial matches, similar topics, or general information\n- When in doubt, mark as NOT_COVERED\n\nRespond ONLY with:\n- `COVERED` - ONLY if 100% certain the exact issue is EXPLICITLY and COMPLETELY covered with sufficient detail\n- `NOT_COVERED` - if not explicitly covered, partially covered, or if uncertain",
"content_quality_check": "Analyze the quality and clarity of this GitHub Issue:\n\nTitle: {issue_title}\nBody: {issue_body}\nTemplate: {template_analysis}\n\nEvaluate the issue quality:\n\nRespond ONLY with:\n- `UNCLEAR` - if too vague, lacks details, or needs more information\n- `BASIC` - if about basic usage, installation, or elementary concepts that can be easily found through documentation or search engines\n- `VALID` - if clear, detailed, and appropriate for the project level",
"pr_spam_detection": "Analyze this GitHub PR for spam content:\n\nTitle: {pr_title}\nBody: {pr_body}\nChanges: {file_changes}\n\nIs this spam or meaningless content?\nSpam indicators: random characters, advertisements, malicious content, completely unrelated content, obvious test submissions, meaningless file changes.\n\nRespond ONLY with:\n- `SPAM` - if spam or meaningless content\n- `NOT_SPAM` - if legitimate content (even if low quality)",
"pr_commit_check": "Analyze this GitHub PR commit title compliance:\n\nTitle: {pr_title}\n\nDoes this title follow standard Git commit conventions or is it descriptive enough?\nGood examples: 'feat: add new feature', 'fix: resolve bug', 'docs: update readme', 'Update README.md', 'Add login functionality', 'Fix authentication issue'\nBad examples: random text, single meaningless words, non-descriptive titles like 'test', 'update', 'fix'\n\nRespond ONLY with:\n- `VALID` - if follows conventions or is descriptive\n- `INVALID` - if meaningless or completely non-descriptive",
"pr_quality_check": "Analyze the quality of this GitHub PR:\n\nTitle: {pr_title}\nBody: {pr_body}\nChanges: {file_changes}\n\nEvaluate the PR quality and purpose:\n\nRespond ONLY with:\n- `UNCLEAR` - if purpose is unclear or lacks proper description\n- `MALICIOUS` - if changes appear malicious or harmful\n- `TRIVIAL` - if changes are meaningless or just testing\n- `VALID` - if clear, purposeful, and legitimate",
"issue_classification": "Classify this GitHub Issue based on its content:\n\nTitle: {issue_title}\nContent: {user_content}\n\nAvailable labels: {labels_options}\n\nAnalyze the issue and choose the MOST SIMILAR label from the available labels above. You MUST select exactly one label from the provided list.\n\nConsider:\n- What type of issue this is\n- What the user is asking for or reporting\n- The nature of the problem or request\n\nRespond with ONLY the exact label name from the available labels list.",
"pr_classification": "Classify this GitHub Pull Request based on its content and changes:\n\nTitle: {pr_title}\nDescription: {pr_body}\nFile Changes: {file_changes}\n\nAvailable labels: {labels_options}\n\nAnalyze the PR and choose the MOST SIMILAR label from the available labels above. You MUST select exactly one label from the provided list.\n\nConsider:\n- What type of changes this PR introduces\n- The primary purpose of this PR\n- The content and scope of the changes\n\nRespond with ONLY the exact label name from the available labels list.",
"readme_relevance": "Analyze if this GitHub Issue is related to content in the README:\n\nREADME Content: {readme_content}\n\nIssue Title: {issue_title}\nIssue Body: {issue_body}\n\nIs this issue asking about something that is already explained or covered in the README?\n\nRespond ONLY with:\n- `RELATED` - if the issue is asking about content covered in README\n- `NOT_RELATED` - if the issue is not about README content",
"readme_answer": "Based STRICTLY on the README content provided, provide a direct answer to this GitHub Issue:\n\nREADME Content: {readme_content}\n\nIssue Title: {issue_title}\nIssue Body: {issue_body}\n\nSTRICT REQUIREMENTS:\n- ONLY use information that is EXPLICITLY stated in the README content above\n- DO NOT infer, assume, or add any information not directly found in the README\n- DO NOT provide general knowledge or external information\n- Answer must be concise (maximum 2-3 sentences in Chinese)\n- Quote the exact relevant section from README when applicable\n\nProvide the answer based ONLY on README content:",
"unclear_issue_smart_answer": "Provide a brief, helpful answer for this unclear GitHub Issue based STRICTLY on README content.\n\nREADME Content: {readme_content}\n\nIssue Title: {issue_title}\nIssue Body: {issue_body}\n\nSTRICT Requirements:\n- ONLY answer if README contains DIRECTLY relevant and EXPLICIT information\n- Answer must be based STRICTLY on specific README content, DO NOT fabricate or infer\n- DO NOT use general knowledge or assumptions\n- Answer must be concise (1-2 sentences, max 60 Chinese characters)\n- If no EXPLICIT relevant content found in README, respond with NEED_MORE_INFO\n- Respond in Chinese\n\nResponse format:\n- If explicit relevant info found in README: HELPFUL_ANSWER: + brief Chinese answer (quote README section)\n- If no explicit relevant info in README: NEED_MORE_INFO"
},
"responses": {
"issue_spam": "🤖 此Issue已被检测为垃圾信息,将被关闭并锁定。如果您认为这是误判,请联系仓库维护者。",
"issue_readme_covered": "🤖 根据上述回答,此问题已得到解决,Issue将被关闭。如有其他疑问,请在此Issue中继续讨论。",
"issue_basic": "🤖 此Issue涉及的是基础使用问题,请善用 Google 等任何搜索引擎。",
"issue_unclear": "🤖 您的Issue描述过于简单,缺乏足够的信息。为了更好地帮助您,请补充以下信息:\n\n📝 **请详细描述问题:**\n- 您遇到的具体问题是什么?\n- 预期的行为是什么?\n- 实际发生的行为是什么?\n\n🔧 **环境信息:**\n- 操作系统版本\n- 相关软件版本\n- 浏览器版本(如适用)\n\n📋 **重现步骤:**\n- 第一步\n- 第二步\n\n📎 **其他信息:**\n- 错误信息截图\n- 相关日志\n\n请编辑您的Issue并添加上述信息,这样我们就能更好地理解和解决您的问题了!",
"readme_answer_prefix": "🤖 根据项目README的内容,我来为您解答这个问题:\n\n",
"unclear_answer_prefix": "🤖 根据项目文档,为您提供以下信息:\n\n",
"pr_closed": "🤖 此Pull Request已被检测为垃圾信息或未符合Git Commit规范,将被关闭。如果您认为这是误判,请联系仓库维护者。",
"pr_malicious": "🤖 此Pull Request包含可疑或恶意内容,将被关闭。如果您认为这是误判,请联系仓库维护者。",
"pr_trivial": "🤖 此Pull Request的变更过于简单或无实际意义,将被关闭。请确保PR包含有价值的改进。",
"pr_invalid_commit": "🤖 此Pull Request的标题不够描述性或不符合规范,将被关闭。如果您认为这是误判,请联系仓库维护者。"
},
"logging": {
"issue_check_start": "检查Issue: {title}",
"pr_check_start": "检查PR: {title}",
"target_repo": "目标仓库: {owner}/{repo}",
"readme_found": "成功获取README.md文件",
"readme_not_found": "未找到README.md文件,将跳过重复内容检查",
"pinned_issues_found": "成功获取置顶Issues内容",
"pinned_issues_not_found": "未找到置顶Issues,将跳过置顶Issues检查",
"spam_check_start": "第1步:检查是否为垃圾信息",
"spam_check_result": "垃圾检测结果: {result}",
"readme_check_start": "第2步:检查README覆盖情况",
"readme_check_result": "README覆盖检查结果: {result}",
"pr_commit_check_start": "第2步:检查提交标题规范",
"pr_commit_check_result": "PR提交规范检查结果: {result}",
"pr_quality_check_start": "第3步:检查PR质量",
"pr_quality_check_result": "PR质量检查结果: {result}",
"quality_check_start": "第3步:检查内容质量",
"quality_check_result": "内容质量检查结果: {result}",
"issue_closed_log": "Issue #{number} 已被关闭并锁定",
"issue_spam_log": "Issue #{number} 被检测为垃圾信息,已关闭并锁定",
"issue_readme_covered_log": "Issue #{number} 内容已在README中覆盖,已关闭但未锁定",
"issue_unclear_log": "Issue #{number} 被标记为描述不清,已添加补充信息提示",
"issue_basic_log": "Issue #{number} 被检测为基础问题,已关闭并锁定",
"issue_passed_log": "Issue #{number} 通过检查,保持开启状态",
"readme_relevance_check": "检查Issue #{number} 与README的相关性",
"readme_answer_generated": "为Issue #{number} 生成基于README的回答",
"unclear_smart_answer_generated": "为UNCLEAR Issue #{number} 生成智能回答",
"unclear_smart_answer_failed": "为UNCLEAR Issue #{number} 生成智能回答失败: {error}",
"unclear_fallback_to_standard": "UNCLEAR Issue #{number} 无法生成智能回答,使用标准提示",
"readme_answer_failed": "为Issue #{number} 生成README回答失败: {error}",
"pr_closed_log": "PR #{number} 已被关闭并锁定",
"pr_commit_rule_log": "PR #{number} 标题不符合Commit规范,已关闭并锁定",
"pr_malicious_log": "PR #{number} 包含恶意内容,已关闭并锁定",
"pr_trivial_log": "PR #{number} 变更过于简单,已关闭并锁定",
"pr_passed_log": "PR #{number} 通过检查,保持开启状态",
"pr_classification_start": "开始对PR进行分类: #{number}",
"pr_label_added": "已为PR #{number} 添加标签: {label}",
"pr_label_no_match": "PR #{number} 分类结果不匹配任何预设标签: {classification}",
"classification_start": "开始对Issue进行分类: #{number}",
"label_added": "已为Issue #{number} 添加标签: {label}",
"label_no_match": "Issue #{number} 分类结果不匹配任何预设标签: {classification}",
"file_changes_count": "获取到{count}个文件的变更信息",
"file_changes_truncated": "(共{total}个文件,仅显示前{shown}个)",
"no_file_changes": "(无文件变更)",
"file_changes_error": "获取PR文件变更失败: {error}",
"file_changes_unavailable": "(无法获取文件变更信息)",
"file_analysis_disabled": "(文件变更分析已禁用)",
"file_analysis_disabled_info": "文件变更分析已禁用,仅分析标题和描述",
"ai_call_start": "准备进行{purpose},使用模型: {model}",
"ai_call_result": "{purpose}结果: {result}",
"ai_call_failed": "{purpose}失败: {error}",
"ai_status_code": "状态码: {code}",
"ai_response_body": "响应体: {body}",
"using_ai_model": "使用AI模型: {model}",
"using_custom_api": "使用自定义API端点",
"using_github_models": "使用GitHub Models API",
"config_info": "配置信息:",
"analysis_depth_info": "- 分析文件变更: {analyze_changes}",
"analysis_depth_details": "- 分析深度: {depth} (文件数:{files}, 行数:{lines})",
"event_no_match": "事件类型不匹配,跳过处理",
"issue_process_error": "处理Issue时出错: {error}",
"pr_process_error": "处理PR时出错: {error}",
"available_labels": "可用标签: {labels}",
"template_detected": "检测到Issue模板: {type} (置信度: {confidence}%)",
"template_analysis": "模板分析: {sections}个有效内容段落",
"user_content_extracted": "已提取用户填写内容: {length}字符",
"quality_analysis": "内容质量: {level} (评分: {score})",
"label_add_failed": "添加标签失败: {error}",
"classification_failed": "AI分类调用失败,跳过分类: {error}",
"classification_process_error": "Issue分类过程出错: {error}",
"readme_fetch_failed": "获取README文件失败",
"pinned_issues_fetch_failed": "获取置顶Issues失败",
"issue_comment_failed": "添加Issue评论失败",
"issue_unclear_comment_failed": "添加Issue描述不清提示评论失败",
"issue_close_failed": "关闭Issue失败",
"issue_lock_failed": "锁定Issue失败",
"label_add_api_failed": "添加标签API调用失败",
"pr_comment_failed": "添加PR评论失败",
"pr_close_failed": "关闭PR失败",
"pr_lock_failed": "锁定PR失败",
"pr_files_fetch_failed": "获取PR文件列表失败"
},
"ai_settings": {
"analyze_file_changes": true,
"max_files_to_analyze": 5,
"max_patch_lines_per_file": 5,
"max_tokens": 100,
"temperature": 0.1
},
"defaults": {
"ai_model": "openai/gpt-4o",
"labels": "bug,enhancement,question",
"analysis_depth": "normal",
"api_base_url": "https://models.github.ai/inference",
"lock_reason": "spam"
},
"analysis_depths": {
"light": {
"max_files": 3,
"max_lines": 3
},
"normal": {
"max_files": 5,
"max_lines": 5
},
"deep": {
"max_files": 10,
"max_lines": 10
}
}
}