(dir: string)
| 62 | } |
| 63 | |
| 64 | export function findWorkflows(dir: string): string[] { |
| 65 | const out: string[] = []; |
| 66 | let entries: string[]; |
| 67 | |
| 68 | try { |
| 69 | entries = readdirSync(dir); |
| 70 | } catch { |
| 71 | return out; |
| 72 | } |
| 73 | |
| 74 | for (const entry of entries) { |
| 75 | const full = join(dir, entry); |
| 76 | |
| 77 | if ( |
| 78 | statSync(full).isFile() && |
| 79 | (entry.endsWith(".yml") || entry.endsWith(".yaml")) |
| 80 | ) { |
| 81 | out.push(full); |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | return out; |
| 86 | } |
| 87 | |
| 88 | /* |
| 89 | * Workflows live at the app root when this template is a standalone repo, but |
no outgoing calls
no test coverage detected