Merge pull request #585 from LaansDole/main

Fix: YAML workflow list UI now only shows 'No description'
This commit is contained in:
Shu Yao 2026-04-04 18:13:11 +08:00 committed by GitHub
commit eec617a67c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,3 @@
import yaml from 'js-yaml'
const apiUrl = (path) => path
@ -201,7 +200,7 @@ export async function fetchWorkflowsWithDesc() {
const fileData = await response.json()
return {
name: filename,
description: getYAMLDescription(fileData.content)
description: fileData.description || 'No description'
}
} catch {
return { name: filename, description: 'No description' }
@ -221,14 +220,6 @@ export async function fetchWorkflowsWithDesc() {
}
}
function getYAMLDescription(content) {
try {
const doc = yaml.load(content)
return doc.graph.description || 'No description'
} catch {
return 'No description'
}
}
}
// Fetch YAML file content