github / github/vscode-github-actions
False warning for Github Action checkout step: "Context access might be invalid"
- 主要语言
- TypeScript
- 星标
- 660
- 派生
- 213
- PR 合并指标
- 30 天内没有已合并 PR
描述
**Describe the bug**
False warning for Github checkout step: "Context access might be invalid"
**To Reproduce**
Steps to reproduce the behavior:
1. With this workflow '...'
- name: checkout
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
I get this warning under problems in VS Code:
"Context access might be invalid: pull_request"
**Expected behavior**
No problem warning in VS Code because I am checking if github event is pull_request or pull_request_target
**Extension Version**
`v0.27.1`
贡献指南
调研方向
Start by reproducing the warning with the workflow snippet in the issue and inspect the reported VS Code problem for the github.event.pull_request context. Trace the extension's context validation behavior for pull_request and pull_request_target; done means the valid guarded access no longer produces a warning.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- typescript
- 领域
- tooling
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100