From 695be05672f4e33d1d8c3148d2ad980baad615cb Mon Sep 17 00:00:00 2001 From: Beth Brennan Date: Mon, 19 Dec 2022 13:03:15 -0500 Subject: [PATCH] Rename cron to schedule --- actions-languageservice/src/complete.expressions.test.ts | 4 ++-- actions-languageservice/src/context-providers/github.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/actions-languageservice/src/complete.expressions.test.ts b/actions-languageservice/src/complete.expressions.test.ts index 23ba40a..cd6c97c 100644 --- a/actions-languageservice/src/complete.expressions.test.ts +++ b/actions-languageservice/src/complete.expressions.test.ts @@ -368,7 +368,7 @@ jobs: const result = await complete(...getPositionFromCursor(input), undefined, undefined); expect(result.map(x => x.label)).not.toContain("inputs"); - expect(result.map(x => x.label)).not.toContain("cron"); + expect(result.map(x => x.label)).not.toContain("schedule"); }); it("includes cron schedules", async () => { @@ -387,7 +387,7 @@ jobs: const result = await complete(...getPositionFromCursor(input), undefined, undefined); - expect(result.map(x => x.label)).toContain("cron"); + expect(result.map(x => x.label)).toContain("schedule"); }); }); diff --git a/actions-languageservice/src/context-providers/github.ts b/actions-languageservice/src/context-providers/github.ts index bd0917c..89fb100 100644 --- a/actions-languageservice/src/context-providers/github.ts +++ b/actions-languageservice/src/context-providers/github.ts @@ -70,7 +70,7 @@ function getEventContext(workflowContext: WorkflowContext): ExpressionData { if (schedule && schedule.length > 0) { const default_cron = schedule[0].cron; // For now, default to the first cron expression only - d.add("cron", new data.StringData(default_cron)); + d.add("schedule", new data.StringData(default_cron)); } return d;