|
message: `Context access might be invalid: ${e.keyName}`, |
If I write some yaml like this:
with:
ssh_key: '${{ '' || secrets.CHECK_SPELLING || '' }}'
(The leading '' || has no value, but the point is regardless of how cautious one tries to be, this warning complains unequivocally.)
I get:

It might be true that the access might be invalid, but the expression as written accepts that fact, and GitHub's design doesn't offer an alternative, so, given that something like this is more or less exactly what GitHub wants people to do.
Doing what a designer wants you to do should not generate an error nor a warning.
languageservices/languageservice/src/expression-validation/evaluator.ts
Line 27 in 69b383a
If I write some yaml like this:
(The leading
'' ||has no value, but the point is regardless of how cautious one tries to be, this warning complains unequivocally.)I get:

It might be true that the access might be invalid, but the expression as written accepts that fact, and GitHub's design doesn't offer an alternative, so, given that something like this is more or less exactly what GitHub wants people to do.
Doing what a designer wants you to do should not generate an error nor a warning.