mirror of
https://github.com/github/awesome-copilot.git
synced 2026-03-12 12:15:12 +00:00
Extract workflow triggers from 'on' frontmatter field, drop tags
Update parseWorkflowMetadata to extract triggers from the 'on' property keys (e.g. schedule, issue_comment) instead of a separate 'triggers' field. Remove tags support from workflows since workflows don't use tags. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -275,14 +275,19 @@ function parseWorkflowMetadata(filePath) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Extract triggers from frontmatter if present
|
||||
const triggers = frontmatter.triggers || [];
|
||||
// Extract triggers from the 'on' field (top-level keys)
|
||||
const onField = frontmatter.on;
|
||||
const triggers = [];
|
||||
if (onField && typeof onField === "object") {
|
||||
triggers.push(...Object.keys(onField));
|
||||
} else if (typeof onField === "string") {
|
||||
triggers.push(onField);
|
||||
}
|
||||
|
||||
return {
|
||||
name: frontmatter.name,
|
||||
description: frontmatter.description,
|
||||
triggers,
|
||||
tags: frontmatter.tags || [],
|
||||
path: filePath,
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user