mirror of
https://github.com/github/awesome-copilot.git
synced 2026-02-20 02:15:12 +00:00
Merge pull request #651 from github/naming-normalisation
Cleaning up the name of a lot of agents
This commit is contained in:
@@ -44,7 +44,6 @@ function ensureDataDir() {
|
||||
* Extract title from filename or frontmatter
|
||||
*/
|
||||
function extractTitle(filePath, frontmatter) {
|
||||
if (frontmatter?.title) return frontmatter.title;
|
||||
if (frontmatter?.name) {
|
||||
return frontmatter.name
|
||||
.split("-")
|
||||
|
||||
@@ -128,12 +128,7 @@ function extractTitle(filePath) {
|
||||
const frontmatter = parseFrontmatter(filePath);
|
||||
|
||||
if (frontmatter) {
|
||||
// Check for title field
|
||||
if (frontmatter.title && typeof frontmatter.title === "string") {
|
||||
return frontmatter.title;
|
||||
}
|
||||
|
||||
// Check for name field and convert to title case
|
||||
// Check for name field
|
||||
if (frontmatter.name && typeof frontmatter.name === "string") {
|
||||
return frontmatter.name
|
||||
.split("-")
|
||||
|
||||
Reference in New Issue
Block a user