Commit Graph

56 Commits

Author SHA1 Message Date
eric sciple 2816233a40 Add block scalar newline warning (#295)
In YAML, block scalars (`|` and `>`) silently add a trailing newline by default
("clip" chomping). This can cause subtle bugs when the newline is unintentional.

This PR adds a warning when clip chomping is used in fields where trailing
newlines commonly cause issues:

- Environment variables (workflow, job, step, container, service levels)
- Action inputs (`with:`)
- Reusable workflow inputs and secrets
- Job outputs
- Matrix values (including `include` and `exclude`)
- Concurrency groups

The warning suggests using `|-` (strip) or `|+` (keep) to be explicit.

Intentionally does NOT warn for:
- `run:` scripts (trailing newlines are normal)
- Fields trimmed server-side (`if:`, `name:`, `runs-on:`, etc.)

The feature is gated behind the `blockScalarChompingWarning` feature flag.
2026-01-12 09:36:43 -06:00
Francesco Renzi 39b9b14e3a Add experimentalFeatures to initialization options (#287)
* Add experimentalFeatures to initialization options

Introduce a feature flagging system for opt-in experimental features.
Clients can enable features via initializationOptions.experimentalFeatures
with granular per-feature control or an 'all' flag to enable everything.

First experimental feature: missingInputsQuickfix (for upcoming code actions)
2026-01-06 07:03:51 +00:00
eric sciple 1cfe9f9f86 languageserver: add .js extensions to imports (ESM prep) (#259) 2026-01-04 15:00:01 -06:00
eric sciple d2ffb50a92 Add language service support for action.yml files (#275)
- Add validation, completion, hover, and document links for action.yml files
- Implement document type detection to route action.yml to action-specific handlers
- Add expression context for composite actions (inputs, steps, github, runner, etc.)
- Add schema validation for required fields, branding, and composite step requirements
- Support JavaScript (node20/node24), Docker, and composite action types
- Validate action references in composite action uses steps
- Add JSDoc comments to parser and template functions
- Refactor hover to use hoverToken consistently
- Fix lint errors and add return type annotations
2026-01-02 10:38:52 -06:00
eric sciple 08c78d2a73 Replace cron info diagnostics with inlay hints (#270)
- Remove DiagnosticSeverity.Information for valid cron expressions
- Add new inlay-hints.ts module with getInlayHints() function
- Register inlayHintProvider capability in language server
- Display human-readable cron descriptions as inline hints

Related #269
2025-12-29 13:47:30 -06:00
eric sciple 4cf3365c68 Suppress warnings for step output property access (#236)
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.
2025-12-08 09:20:02 -06:00
eric sciple e20dbae803 Skip secrets/vars validation when context is incomplete (#233) 2025-12-08 09:18:18 -06:00
Alex Howard 69b383af3d Skip variable validation for dynamic environments (#178) 2025-12-06 17:38:01 -06:00
Anthony Zavala e597a0c800 update env secret and vars parameters 2025-05-07 19:43:30 +00:00
Beth Brennan 950407cc05 Merge pull request #81 from actions/elbrenn/vscode-uri
Change vscode-uri import syntax
2024-07-08 11:48:18 -04:00
Beth Brennan 02075a6585 change vscode-uri import syntax 2024-07-05 13:17:23 -04:00
Yukai Chou fe696132cf Update tests 2023-09-08 18:02:55 +08:00
Olfi01 b912482163 Apply suggestions from code review
Changed parameter naming to match general pattern

Co-authored-by: Christopher Schleiden <cschleiden@live.de>
2023-05-25 00:57:30 +02:00
flmeyer 41436c6570 Use correct RequestError class 2023-05-19 16:34:58 +02:00
flmeyer 468b68840b Add try-catch to avoid failing requests
On GHES servers below version 3.8, the variables context is unavailable, resulting in 404 errors when calling the corresponding endpoint.
2023-05-12 22:42:09 +02:00
flmeyer 57a77551b0 Enable support for GitHub Enterprise Server 2023-05-08 17:00:05 +02:00
Felipe Suero 63b170f2a6 Merge pull request #27 from actions/secrets-v2
Remove Secret Errors for dynamic environments
2023-05-03 14:20:33 -04:00
Felipe Suero 94451fa8f2 nits 2023-05-02 14:57:24 -04:00
Felipe Suero eefd820cc5 prettify 2023-05-02 11:50:51 -04:00
Felipe Suero 58712f4d46 prettify 2023-05-02 11:43:07 -04:00
Felipe Suero 0bd67083ff add comments 2023-05-02 11:23:48 -04:00
Felipe Suero 40c20d5504 handle the edge-cases 2023-05-02 11:22:00 -04:00
Felipe Suero c4d478d459 commiting instead of stashing 2023-04-26 11:57:08 -04:00
Felipe Suero 9945ec321b why does this not work? 2023-04-25 10:00:29 -04:00
Crystal Tenn 2449e5cea1 make variable names more specific 2023-04-18 18:16:55 -04:00
Crystal Tenn dba3cf5d96 remove unused reference to path 2023-04-18 18:13:52 -04:00
Crystal Tenn 804f83828f fix path reference for reusable workflows and use vscodeURI instead 2023-04-18 17:30:53 -04:00
Beth Brennan 50f9c04a91 Wrap fetchActionsMetadata in provider checking sessionToken 2023-03-27 14:00:58 -04:00
Christopher Schleiden b82ddcdb42 Update import paths
String replacement from `@github/actions-` to `@actions/`
2023-03-23 09:57:18 -07:00
Josh Gross 33b36dcbf2 Lint the language server package 2023-03-20 13:50:08 -04:00
Josh Gross 43a622174d Handle environments that don't exist 2023-03-17 14:51:59 -04:00
Christopher Schleiden eb56401caf Provide links to navigate to reusable-workflows 2023-03-16 17:09:23 -07:00
Josh Gross fa28b2864b Lint the language server package 2023-03-15 17:37:35 -04:00
Josh Gross 8279bc1697 Add an error utility for messages and status codes 2023-03-15 17:36:51 -04:00
Beth Brennan 6d2f3e5d8c Spelling 2023-03-14 11:14:36 -04:00
Beth Brennan 28dde4d6ac Skip secret validation for workflow_call 2023-03-13 17:24:05 -04:00
Josh Gross e557ccc567 Support case-insensitive value providers 2023-03-08 15:52:33 -05:00
Beth Brennan 22ba9a79e6 Merge pull request #176 from github/elbrenn/called-secret-complete
Convert secrets, complete secrets in called workflow
2023-03-08 13:59:55 -05:00
Jacob Wallraff e3973298fa Merge pull request #172 from github/thyeggman/cache-workflow-results
Cache parsed workflow and template results
2023-03-08 09:18:44 -08:00
Beth Brennan e1505ed143 Remove empty line 2023-03-07 16:55:22 -05:00
Beth Brennan de09e8771a Merge branch 'main' into elbrenn/called-secret-complete 2023-03-07 16:44:25 -05:00
Laura Yu 47250a4ac8 Check with repo-permission before accessing secrets and variables (#175) 2023-03-07 13:21:59 -08:00
Beth Brennan 87e3131958 Convert secrets, complete secrets in called workflow 2023-03-07 15:11:16 -05:00
Jacob Wallraff 572b193c25 Merge branch 'main' into thyeggman/cache-workflow-results 2023-03-06 15:22:28 -08:00
Jacob Wallraff b272ab29be Combine methods 2023-03-06 15:16:26 -08:00
Josh Gross c817c9b321 Update description test with action link 2023-03-06 15:23:26 -05:00
Josh Gross 2e4143c8f6 Use step-uses definition key 2023-03-06 15:06:38 -05:00
Josh Gross 41cdb46d23 Include link in action description 2023-03-06 14:54:43 -05:00
Jacob Wallraff 70c122b0e4 Reset cache for all tests 2023-03-06 11:52:21 -08:00
Josh Gross 6dde0b554d Show action description on hover 2023-03-06 14:44:18 -05:00