Merge pull request #62 from github/elbrenn/schedule

Rename cron to schedule
This commit is contained in:
Beth Brennan
2022-12-19 16:02:17 -05:00
committed by GitHub
2 changed files with 3 additions and 3 deletions
@@ -409,7 +409,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 () => {
@@ -428,7 +428,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");
});
});
@@ -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;