getAvailableWorkflowNames returns a list of available workflow names (without .md extension)
()
| 236 | |
| 237 | // getAvailableWorkflowNames returns a list of available workflow names (without .md extension) |
| 238 | func getAvailableWorkflowNames() []string { |
| 239 | mdFiles, err := getMarkdownWorkflowFiles("") |
| 240 | if err != nil { |
| 241 | return nil |
| 242 | } |
| 243 | |
| 244 | return sliceutil.Map(mdFiles, func(file string) string { |
| 245 | return strings.TrimSuffix(filepath.Base(file), ".md") |
| 246 | }) |
| 247 | } |
| 248 | |
| 249 | // suggestWorkflowNames returns up to 3 similar workflow names using fuzzy matching |
| 250 | // The target can be a workflow name or filename (with or without .md extension) |