Fixes#51
Added the following activity types to pull_request and pull_request_target:
- milestoned
- demilestoned
- enqueued
- dequeued
These types were missing from workflow-v1.0.json but are valid workflow
triggers per GitHub docs.
Also added schema-sync.test.ts to ensure activity types in workflow-v1.0.json
stay in sync with webhooks.json. The test:
- Checks both directions (webhooks→schema and schema→webhooks)
- Has WEBHOOK_ONLY for types not valid as workflow triggers:
- check_suite: requested, rerequested
- registry_package: default
- Has SCHEMA_ONLY for types valid in workflows but not in webhooks:
- registry_package: updated
- Has NAME_MAPPINGS for naming differences:
- project_column: edited (webhook) ↔ updated (schema)
- Provides actionable error messages when mismatches are found
Fixes vscode#395 - Empty value for choice option shows 'Unexpected value' error
Empty strings are valid options for workflow_dispatch inputs with type: choice.
They allow users to make a choice 'optional' or force explicit selection.
Changes:
- Add sequence-of-string type that allows empty strings (unlike sequence-of-non-empty-string)
- Use sequence-of-string for workflow_dispatch options field
- Add test to verify empty string in choice options doesn't produce validation errors
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.
Fixed the cursor offset calculation for multi-line strings. The original
code unconditionally added +1 for a newline separator, but when the cursor
is on the first content line, there are no lines before it, so adding +1
produced an off-by-one error.
Fixes: vscode-github-actions#81
This adds an error when workflow-level and job-level concurrency groups
match, which causes a deadlock at runtime. The job blocks waiting for
the workflow to finish, while the workflow is waiting for the job to finish.
- Detects both string and mapping forms of concurrency
- Only errors on static string matches (expressions are not compared)
- Case-sensitive comparison
- Errors on both workflow-level and job-level with appropriate messages
Fixes#135
Fixes https://github.com/github/vscode-github-actions/issues/305
Step outputs are dynamic - actions can generate outputs based on
their inputs, so validating output property names is not feasible.
This marks step output dictionaries as incomplete so that accessing
any output property won't produce a warning. Known outputs from
action.yml will still be suggested for autocomplete.
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.
Fixes https://github.com/github/vscode-github-actions/issues/405
YAML anchors (&name) and aliases (*name) are now properly supported.
When an alias is encountered during parsing, it is resolved to its
anchored value, making aliases transparent to the rest of the system.
Changes:
- workflow-parser: Handle isAlias nodes in YamlObjectReader.getNodes()
- languageservice: Add tests for various anchor/alias patterns
Test cases:
- Anchors in env mappings
- Multiple aliases to same anchor
- Anchors in matrix strategy
- Anchors in steps
- Scalar anchors (e.g., runs-on)
- 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