github / github/vscode-github-actions

False warning for Github Action checkout step: "Context access might be invalid"

未關閉
#452 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug
主要語言
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`

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。