Commit Graph
13 Commits
Author SHA1 Message Date
eric scipleandGitHub 8d2c24d7f5 Add missing runner context properties (environment, debug, workspace) (#241)
Fixes #78, #121

Adds three missing properties to the runner context:
- runner.environment: The runner environment (github-hosted or self-hosted)
- runner.debug: Set to '1' when step debug logging is enabled via ACTIONS_STEP_DEBUG
- runner.workspace: The runner-specific working directory path for the job

These are documented official properties that were causing false 'Context access might be invalid' warnings.
2025-12-08 09:22:49 -06:00
eric scipleandGitHub 1a63ee9de6 fix: always provide strategy and matrix contexts with defaults (#235)
Fixes https://github.com/github/vscode-github-actions/issues/113

The strategy and matrix contexts are always available in job steps,
even when no strategy block is defined.

Changes:
- Remove the hasStrategy filter from filterContextNames in default.ts
- Return null for matrix when no strategy is defined
- Provide default values for strategy properties:
  - fail-fast: true
  - job-index: 0
  - job-total: 1
  - max-parallel: 1
- Use defaults for missing strategy properties even when strategy IS defined
- Add comprehensive unit tests for strategy context

This eliminates false positive 'Context access might be invalid'
warnings when using strategy.* or matrix in jobs without an
explicit strategy block.
2025-12-08 09:19:40 -06:00
eric scipleandGitHub 216fcbb8c4 Add uses format validation for step and job-level workflows (#220) 2025-12-03 09:44:36 -06:00
eric scipleandGitHub 03d68e89c6 Refactor if-condition to use schema-driven validation and AST-based status function detection (#218)
- Read allowed context from schema definition instead of hardcoded constants
- Parse expressions into AST to accurately detect status functions (avoids false positives from string literals)
- Export ensureStatusFunction helper that combines checking and wrapping logic
- Remove step-if.yml from skipped tests (now passes with accurate detection)
- Add tests for if-condition wrapping in hover/completion position mapping
2025-11-25 08:56:34 -06:00
Christopher Schleiden cf4dce7f71 Improve expression validation for short-circuiting expressions 2023-04-05 13:54:08 -07:00
Christopher SchleidenandChristopher Schleiden b82ddcdb42 Update import paths
String replacement from `@github/actions-` to `@actions/`
2023-03-23 09:57:18 -07:00
Josh Gross 9ef34c7e41 Lint the language service package 2023-03-20 13:33:58 -04:00
Beth Brennan 28dde4d6ac Skip secret validation for workflow_call 2023-03-13 17:24:05 -04:00
Jacob Wallraff b272ab29be Combine methods 2023-03-06 15:16:26 -08:00
Jacob Wallraff b3f22cb702 Format 2023-03-06 11:56:49 -08:00
Jacob Wallraff 70c122b0e4 Reset cache for all tests 2023-03-06 11:52:21 -08:00
Laura YuandGitHub 6843c36809 Add jobs context (#160) 2023-02-23 11:19:07 -08:00
Christopher Schleiden 2a3d63551f Rename folders 2023-02-22 15:52:40 -08:00