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

Function deduplicateCommits

scripts/commit-summary.js:197–218  ·  view source on GitHub ↗
(commits)

Source from the content-addressed store, hash-verified

195
196// 去重和过滤提交信息
197function deduplicateCommits(commits) {
198 const seen = new Set();
199 const filtered = [];
200
201 for (const commit of commits) {
202 // 跳过自动化提交
203 if (commit.message.includes('🤖 自动更新插件列表') ||
204 commit.message.includes('Merge pull request') ||
205 commit.message.match(/^Update \w+\.(json|yml|md)$/)) {
206 continue;
207 }
208
209 // 基于消息内容去重
210 const key = commit.message.toLowerCase().trim();
211 if (!seen.has(key)) {
212 seen.add(key);
213 filtered.push(commit);
214 }
215 }
216
217 return filtered;
218}
219
220// 插件分类配置
221const PLUGIN_CATEGORIES = {

Callers 1

mainFunction · 0.85

Calls 1

addMethod · 0.45

Tested by

no test coverage detected