github / github/vscode-github-actions

Support Custom GitHub Action use of GITHUB_ENV

Đang mở
#47 14 bình luận 42 reaction 0 người được giao Xem trên GitHub
enhancement
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
Capture d’écran 2023-03-28 à 20 15 36

Hướng dẫn đóng góp

Mở 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

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.