diff --git a/actions-languageservice/src/complete.expressions.test.ts b/actions-languageservice/src/complete.expressions.test.ts index 3456ec2..23ba40a 100644 --- a/actions-languageservice/src/complete.expressions.test.ts +++ b/actions-languageservice/src/complete.expressions.test.ts @@ -286,13 +286,6 @@ on: type: boolean jobs: a: - outputs: - build_id: my-build-id - runs-on: ubuntu-latest - steps: - - run: echo hello a - b: - needs: [a] runs-on: ubuntu-latest steps: - run: echo "hello \${{ inputs.| @@ -308,13 +301,6 @@ on: workflow_dispatch: jobs: a: - outputs: - build_id: my-build-id - runs-on: ubuntu-latest - steps: - - run: echo hello a - b: - needs: [a] runs-on: ubuntu-latest steps: - run: echo "hello \${{ inputs.| @@ -358,13 +344,6 @@ jobs: type: boolean jobs: a: - outputs: - build_id: my-build-id - runs-on: ubuntu-latest - steps: - - run: echo hello a - b: - needs: [a] runs-on: ubuntu-latest steps: - run: echo "hello \${{ github.event.inputs.| @@ -410,8 +389,6 @@ jobs: expect(result.map(x => x.label)).toContain("cron"); }); - - it("excludes cron scheudle when no schedule", async () => {}); }); describe("steps context", () => { diff --git a/actions-languageservice/src/context-providers/github.ts b/actions-languageservice/src/context-providers/github.ts index 90e0e33..bd0917c 100644 --- a/actions-languageservice/src/context-providers/github.ts +++ b/actions-languageservice/src/context-providers/github.ts @@ -69,6 +69,7 @@ function getEventContext(workflowContext: WorkflowContext): ExpressionData { const schedule = events["schedule"]; 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)); } diff --git a/actions-languageservice/src/validate.expressions.test.ts b/actions-languageservice/src/validate.expressions.test.ts index 6867dcd..d8a7a25 100644 --- a/actions-languageservice/src/validate.expressions.test.ts +++ b/actions-languageservice/src/validate.expressions.test.ts @@ -826,13 +826,6 @@ on: type: boolean jobs: a: - outputs: - build_id: my-build-id - runs-on: ubuntu-latest - steps: - - run: echo hello a - b: - needs: [a] runs-on: ubuntu-latest steps: - run: echo "hello \${{ github.event.inputs.name }}" @@ -847,11 +840,11 @@ jobs: range: { end: { character: 56, - line: 26 + line: 19 }, start: { character: 23, - line: 26 + line: 19 } }, severity: DiagnosticSeverity.Warning