github / github/vscode-github-actions
Missing expression syntax or escaping for `if: ! expr` is not detected
- 主要語言
- TypeScript
- 星號
- 660
- 分支
- 213
- PR 合併指標
- 30 天內沒有已合併 PR
描述
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.
貢獻指南
研究方向
Reproduce the unescaped expression from the issue in .github/workflows/build.yml and compare it with the documented escaped form. Trace the extension's current workflow-validation entry point and existing diagnostics; done means the unescaped form receives a lint error while valid escaped and expression forms remain accepted.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- github-actions, typescript
- 領域
- ci-cd, devtools
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100