Commit Graph
19 Commits
Author SHA1 Message Date
eric scipleandGitHub 5359433879 Pass featureFlags to onCompletion in language server (#304)
* Pass featureFlags to onCompletion in language server

* Use import type for FeatureFlags in on-completion.ts
2026-01-19 15:11:32 -06:00
0fe31c6656 Setup CodeActions and add quickfix for missing inputs (#254)
* Setup CodeActions and add quickfix for missing inputs

* PR feedback

* Update languageservice/src/code-actions/quickfix/add-missing-inputs.ts

Co-authored-by: Salman Chishti <salmanmkc@GitHub.com>

* Fix indentSize detection for code actions after rebase

- Add indentSize to MissingInputsDiagnosticData interface
- Pass indentSize parameter from validate.ts to validateActionReference
- Detect indentSize from workflow structure (jobs key to first child)
- Fall back to detecting from with: block children when available

* update typescript

* formatting

* linting

* Gate missing inputs quickfix behind feature flag

* Address PR review: rename files, move position calculation to quickfix

- Rename index.ts files to follow repo patterns:
  - code-actions/index.ts → code-actions/code-actions.ts
  - code-actions/quickfix/index.ts → quickfix/quickfix-providers.ts
- Move position calculation from validation to quickfix:
  - MissingInputsDiagnosticData now passes raw token ranges
  - Quickfix computes insertion position and indentation at code action time
  - detectIndentSize moved from validate.ts to validate-action-reference.ts

* wip

* Remove pointless comment

---------

Co-authored-by: Salman Chishti <salmanmkc@GitHub.com>
2026-01-14 15:58:20 +00:00
eric scipleandGitHub 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 RenziandGitHub 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 scipleandGitHub 1cfe9f9f86 languageserver: add .js extensions to imports (ESM prep) (#259) 2026-01-04 15:00:01 -06:00
eric scipleandGitHub 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
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 57a77551b0 Enable support for GitHub Enterprise Server 2023-05-08 17:00:05 +02:00
Beth Brennan 50f9c04a91 Wrap fetchActionsMetadata in provider checking sessionToken 2023-03-27 14:00:58 -04: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 33b36dcbf2 Lint the language server package 2023-03-20 13:50:08 -04:00
Christopher Schleiden eb56401caf Provide links to navigate to reusable-workflows 2023-03-16 17:09:23 -07:00
Jacob Wallraff b272ab29be Combine methods 2023-03-06 15:16:26 -08:00
Jacob Wallraff 2fc36cc6a1 Fix imports and format 2023-03-03 12:49:25 -08:00
Jacob Wallraff d7c19f529d Clear whole cache on workspace change 2023-03-03 10:32:56 -08:00
Jacob Wallraff 44e3cc2d5f Cleanup 2023-03-02 18:16:32 -08:00
Jacob Wallraff 6eacdb82a5 Import new methods 2023-03-02 16:56:54 -08:00
Jacob Wallraff f2f377c21c Simple caching for parsed workflow and template 2023-03-02 16:43:23 -08:00
Christopher Schleiden 2a3d63551f Rename folders 2023-02-22 15:52:40 -08:00