github / github/vscode-github-actions
The `runner.environment` context is shown as invalid in this extension.
- 主要語言
- TypeScript
- 星號
- 660
- 分支
- 213
- PR 合併指標
- 30 天內沒有已合併 PR
描述
**Describe the bug**
When we use the `runner.environment` context listed in [official document](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#runner-context), this extension reports "Context access might be invalid".
**To Reproduce**
Steps to reproduce the behavior:
1. With this workflow '...'
```yaml
steps:
- if: ${{ runner.environment == 'github-hosted' }}
run: echo "This is a ${{ runner.environment }} runner"
```
2. Do this '...'
Open the "Problems" Panel.
3. See error\
```plain
Context access might be invalid: environment
```
**Expected behavior**
The `runner.environment` context listed in [official document](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#runner-context) can be recognized well by this extension.
**Screenshots**

**Extension Version**
`v0.27.0`
**Additional context**
Add any other context about the problem here.
貢獻指南
研究方向
首先,在擴充功能中重現所提供的 workflow 片段,並檢查產生 Problems-panel 警告的內容驗證路徑。當 runner.environment 依照連結的 GitHub Actions runner context 文件獲得辨識,且此運算式不再顯示警告時,工作即完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- typescript
- 領域
- tooling
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100