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;