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.
コントリビューションガイド
調査の方向性
Issue にあるエスケープされていない式を .github/workflows/build.yml で再現し、ドキュメント化されたエスケープ形式と比較します。Extension の現在の workflow 検証エントリポイントと既存の診断を追跡します。エスケープされていない形式が lint エラーを受け、妥当なエスケープ形式と式形式は引き続き受け入れられれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- github-actions, typescript
- 領域
- ci-cd, devtools
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100