diff options
author | 2020-11-20 11:53:55 -0600 | |
---|---|---|
committer | 2020-11-20 11:53:55 -0600 | |
commit | 1bedcd71886ac9c20bf91a6d48e428622ab6d1b1 (patch) | |
tree | 18d1de469642d22a4e3ae076682cb90d7b1134ab | |
parent | ed8574e5fe337a8179bef5bb7f1d13b8efe09bc6 (diff) | |
download | refined-github-1bedcd71886ac9c20bf91a6d48e428622ab6d1b1.tar.gz refined-github-1bedcd71886ac9c20bf91a6d48e428622ab6d1b1.tar.zst refined-github-1bedcd71886ac9c20bf91a6d48e428622ab6d1b1.zip |
Fix YAML parsing in `next-scheduled-github-action`
Ideally this would be extracted and tested
-rw-r--r-- | source/features/next-scheduled-github-action.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/features/next-scheduled-github-action.tsx b/source/features/next-scheduled-github-action.tsx index c7f50bce..eda70649 100644 --- a/source/features/next-scheduled-github-action.tsx +++ b/source/features/next-scheduled-github-action.tsx @@ -32,8 +32,8 @@ const getScheduledWorkflows = cache.function(async (): Promise<Record<string, st const schedules: Record<string, string> = {}; for (const workflow of workflows) { const workflowYaml = workflow.object.text; - const name = /^name[:\s'"]+(.+)['"]?/m.exec(workflowYaml); - const cron = /schedule[:\s-]+cron[:\s'"]+(.+)['"]?/m.exec(workflowYaml); + const name = /^name[:\s'"]+([^'"\n]+)/m.exec(workflowYaml); + const cron = /schedule[:\s-]+cron[:\s'"]+([^'"\n]+)/m.exec(workflowYaml); if (name && cron) { schedules[name[1]] = cron[1]; |