github / github/vscode-github-actions
Support Custom GitHub Action use of GITHUB_ENV
- Ngôn ngữ chính
- TypeScript
- Star
- 660
- Fork
- 213
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
**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

Hướng dẫn đóng góp
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- github-actions, typescript
- Lĩnh vực
- ci-cd, tooling
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100