github / vscode-github-actions

GitHub Actions extension for VS Code
https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-github-actions
MIT License
498 stars 91 forks source link

Resource not accessible by integration (textDocument/hover and expand repository secrets) #198

Open savannahostrowski opened 1 year ago

savannahostrowski commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce I get the same error when I 1) try to view repo secrets/variables and 2) hover on environment variables referenced in my workflow file

  1. Open "Settings pane"
  2. Expand "Secrets" > "Repository Secrets"

OR

  1. Hover an environment variable in my workflow file

Expected behavior Expect to see repo secrets/variables set.

Screenshots image image

Extension Version v0.25.7

Additional context I'm working in Codespaces

savannahostrowski commented 1 year ago

I'll also add that all the icons sporadically disappear for running pipelines (e.g. spinners, refresh icon etc.)

memchr commented 1 year ago

textDocument/completion also trigger this error when completing actions context. Tested in codespaces with original settings.

I am only able to reproduce the error in the codespaces.

memchr commented 1 year ago

This may be a problem with the universal devcontainer used as the default codespace container. I haven't been able to reproduce the problem with the custom devcontainer

ragchuck commented 1 year ago

I have a very similar error, but for me it's the organisational secrets, while using GHE

  request: {
    method: 'GET',
    url: 'https://xxxxxxxxx/api/v3/repos/xxxxx/xxxxxx/actions/organization-variables?per_page=100',
    headers: {
      accept: 'application/vnd.github.v3+json',
      'user-agent': 'VS Code GitHub Actions (0.26.2) octokit-rest.js/19.0.7 octokit-core.js/4.1.0 Node.js/18.15.0 (linux; x64)',
      authorization: 'token [REDACTED]'
    },
    request: { hook: [Function: bound bound e] }
  }
}
Failure to retrieve organization secrets:  Cs [HttpError]: Not Found
sgbaird commented 1 year ago

A workaround is to open up the Command Palette, type "secret", and follow the prompts there. @memchr what do you mean by the custom dev container? Can you provide the container configuration file?

lemisieur commented 6 months ago

I'm dealing with the same issue - what prompt are we talking about here? The only option I get from the command pallet when I type "secret" is to manage my codespaces secrets

odonnellmichael commented 5 months ago

@sgbaird I'm also interested in knowing what prompts you're referring to. I get an option to manage my codespaces secrets, but I'm not sure in what way I'm supposed to manage them in order to make this work.

marcin-sg commented 1 month ago

Have the same issue on codespaces and it is becoming increasing annoying... The response code 403 suggest that the codespace is using token without the necessary rights. Simple test confirms that: image

However neither overwriting the token in devcontainer json (terminal.integrated.env.linux and runArgs) nor setting additional permissions for the repository seems to be working.... image