mirror of
https://github.com/github/awesome-copilot.git
synced 2026-04-30 04:05:55 +00:00
fix: improve security-review skill discovery (#1515)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -430,14 +430,25 @@ function generateSkillsData(gitDates) {
|
|||||||
|
|
||||||
// Get last updated from SKILL.md file
|
// Get last updated from SKILL.md file
|
||||||
const skillFilePath = `${relativePath}/SKILL.md`;
|
const skillFilePath = `${relativePath}/SKILL.md`;
|
||||||
|
const title = metadata.name
|
||||||
|
.split("-")
|
||||||
|
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
|
||||||
|
.join(" ");
|
||||||
|
const searchText = [
|
||||||
|
title,
|
||||||
|
metadata.description,
|
||||||
|
folder,
|
||||||
|
metadata.name,
|
||||||
|
relativePath,
|
||||||
|
category,
|
||||||
|
]
|
||||||
|
.join(" ")
|
||||||
|
.toLowerCase();
|
||||||
|
|
||||||
skills.push({
|
skills.push({
|
||||||
id: folder,
|
id: folder,
|
||||||
name: metadata.name,
|
name: metadata.name,
|
||||||
title: metadata.name
|
title,
|
||||||
.split("-")
|
|
||||||
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
|
|
||||||
.join(" "),
|
|
||||||
description: metadata.description,
|
description: metadata.description,
|
||||||
assets: metadata.assets,
|
assets: metadata.assets,
|
||||||
hasAssets: metadata.assets.length > 0,
|
hasAssets: metadata.assets.length > 0,
|
||||||
@@ -447,6 +458,7 @@ function generateSkillsData(gitDates) {
|
|||||||
skillFile: skillFilePath,
|
skillFile: skillFilePath,
|
||||||
files: files,
|
files: files,
|
||||||
lastUpdated: gitDates.get(skillFilePath) || null,
|
lastUpdated: gitDates.get(skillFilePath) || null,
|
||||||
|
searchText,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -774,7 +786,7 @@ function generateSearchIndex(
|
|||||||
description: skill.description,
|
description: skill.description,
|
||||||
path: skill.skillFile,
|
path: skill.skillFile,
|
||||||
lastUpdated: skill.lastUpdated,
|
lastUpdated: skill.lastUpdated,
|
||||||
searchText: `${skill.title} ${skill.description}`.toLowerCase(),
|
searchText: skill.searchText,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user