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:
Aaron Powell
2026-02-25 16:23:49 +11:00
parent 6fc9e9375a
commit 83aed9e974
4 changed files with 11 additions and 54 deletions

View File

@@ -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,
};
},