-
Notifications
You must be signed in to change notification settings - Fork 148
fix: (part) suppress false warnings "Context access might be invalid" for secrets/vars #534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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.secretssetting 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.
There was a problem hiding this 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.
There was a problem hiding this 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.
b52e116 to
205854f
Compare
There was a problem hiding this 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.
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:
github-actions.validation.secretstopackage.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:
SecretsValidationModetype from the language server initialization options insrc/workflow/languageServer.ts.Mentioned setting:
Unfixed problem:

Fixed:
