github / github/vscode-github-actions
Support Custom GitHub Action use of GITHUB_ENV
- 主要語言
- TypeScript
- 星號
- 660
- 分支
- 213
- PR 合併指標
- 30 天內沒有已合併 PR
描述
**Is your feature request related to a problem? Please describe.**
Some GitHub Actions use `GITHUB_ENV` to set up custom environment variables.
When used inside a workflow, use `${{ env.CUSTOM_VARIABLE }}` is flagged as `Context access might be invalid`.
**Describe the solution you'd like**
Enable the custom GitHub Actions developer to define statically or dynamically the generated environment variables (like for the action output) and use it in this plugin to remove false-positive.
**Additional context**
This workflow is flagged with the issue
```yaml
name: "Context access might be invalid"
on: push
jobs:
context-access-might-be-invalid:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup environment variables
uses: rlespinasse/github-slug-action@v4
- name: Print custom environment variables
run: echo ${{ env.GITHUB_REF_SLUG }}
```
And produces

貢獻指南
研究方向
No source file, test, or entry point is named in the issue. Start by tracing how the extension validates env context and how custom action outputs are represented; compare that behavior with the GITHUB_ENV workflow example. Done means custom environment variables from actions can be declared or resolved without the false-positive diagnostic.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- github-actions, typescript
- 領域
- ci-cd, tooling
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100