Skip to content

Conversation

@davidruzicka
Copy link

@davidruzicka davidruzicka commented Dec 3, 2025

Users experience false "Context access might be invalid" warnings for repository secrets and variables because of temporarily unavailable context during language server initialization.
This pull request is part of the fix and introduces a new configuration option to control how secrets and variables validation is handled in GitHub Actions workflow files.

Partially fixes issue #222

Depends on PR223 action/languageservices

Configuration enhancements:

  • Added a new setting github-actions.validation.secrets to package.json, allowing users to choose between "auto", "always", or "never" for secrets/variables validation in workflow files. This setting controls when warnings about secrets access are shown.

Language server dependency:

  • Imported the new SecretsValidationMode type from the language server initialization options in src/workflow/languageServer.ts.

Mentioned setting:

  • auto (default) - suppresses warnings when repository context is unavailable (e.g., timing issues during initialization)
  • always - shows warnings even when context is incomplete (same as without this fix)
  • never - disables secrets/variables validation entirely
obrazek

Unfixed problem:
unfixed

Fixed:
fixed

Copilot AI review requested due to automatic review settings December 3, 2025 20:41
@davidruzicka davidruzicka requested a review from a team as a code owner December 3, 2025 20:41
Copilot finished reviewing on behalf of davidruzicka December 3, 2025 20:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new configuration option to address false warnings about context access for secrets and variables in GitHub Actions workflow files. The change allows users to control when validation warnings are displayed, with a default "auto" mode that suppresses warnings when repository context is temporarily unavailable during initialization.

  • Added github-actions.validation.secrets setting with three modes: "auto" (default), "always", and "never"
  • Integrated the new setting into the language server initialization to pass the validation mode to the language server
  • Created a helper function getSecretsValidationMode() to retrieve the configuration value

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
package.json Adds the new github-actions.validation.secrets configuration property with enum values and descriptions
src/workflow/languageServer.ts Imports SecretsValidationMode type, implements getSecretsValidationMode() helper function, and passes the configuration to language server initialization options

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@davidruzicka davidruzicka force-pushed the dr-remove-warning-for-repository-variables-and-secrets branch from b52e116 to 205854f Compare December 3, 2025 23:07
@davidruzicka davidruzicka requested a review from Copilot December 3, 2025 23:07
Copilot finished reviewing on behalf of davidruzicka December 3, 2025 23:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant