github / github/vscode-github-actions
Missing expression syntax or escaping for `if: ! expr` is not detected
- Vorherrschende Sprache
- TypeScript
- Sterne
- 660
- Forks
- 213
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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.
Beitragsleitfaden
Rechercherichtung
Reproduziere den nicht maskierten Ausdruck aus dem Issue in .github/workflows/build.yml und vergleiche ihn mit der dokumentierten maskierten Form. Verfolge den aktuellen Einstiegspunkt der Workflow-Validierung der Extension und die vorhandenen Diagnosen; die Aufgabe ist abgeschlossen, wenn die nicht maskierte Form einen Lint-Fehler erhält, während gültige maskierte und Ausdrucksformen weiterhin akzeptiert werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- github-actions, typescript
- Bereich
- ci-cd, devtools
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100