Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mjheitland opened this issue Mar 11, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@mjheitland
Copy link

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

@grgar
Copy link

grgar commented Apr 26, 2025

Duplicate of #222

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog 🗒
Development

No branches or pull requests

2 participants