github / github/vscode-github-actions
Missing expression syntax or escaping for `if: ! expr` is not detected
- Lenguaje dominante
- TypeScript
- Estrellas
- 660
- Forks
- 213
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
The following is not validated (from [github docs](https://docs.github.com/en/actions/using-jobs/using-conditions-to-control-job-execution)):
> You must always use the ${{ }} expression syntax or escape with '', "", or () when the expression starts with !, since ! is reserved notation in YAML format. For example:
>
> ```
> if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
> ```
>
> For more information, see "[Expressions](https://docs.github.com/en/actions/learn-github-actions/expressions)."
Currently, this will not be detected as a bug:
```
if: ! startsWith(github.ref, 'refs/tags/')
```
The runner will abort with:
```
The workflow is not valid. .github/workflows/build.yml: (Line: 42, Col: 42, Idx: 420) - (Line: 42, Col: 43, Idx: 421): While parsing a tag, did not find expected tag URI.
```
It should be linted as an error.
Guía de contribución
Línea de trabajo
Reproduce la expresión sin escape del issue en .github/workflows/build.yml y compárala con la forma con escape documentada. Rastrea el punto de entrada actual de la validación del workflow de la extensión y los diagnósticos existentes; la tarea estará terminada cuando la forma sin escape reciba un error de lint, mientras que las formas válidas con escape y de expresión sigan aceptándose.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- github-actions, typescript
- Área
- ci-cd, devtools
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100