-
👶 @viktomasAuthor MaintainerThat's most likely a bug @KevSlashNull. Since you have access to the snippet through the web interface, you should have access to it through the GraphQL API as well.
Could you please try to go to the https://gitlab.com/-/graphql-explorer GraphiQL interface and try to run this query:
query GetSnippets($projectPath: ID!, $afterCursor: String) { project(fullPath: $projectPath) { id snippets(after: $afterCursor) { pageInfo { hasNextPage endCursor } nodes { id title description blobs { nodes { name path rawPath } } } } } }with these query variables:
{"projectPath": "gitlab-org/gitlab-vscode-extension"} -
🐾 @KevSlashNullContributorOh okay @viktomas, I get this result (which includes this snippet):
{ "data": { "project": { "id": "gid://gitlab/Project/5261717", "snippets": { "pageInfo": { "hasNextPage": false, "endCursor": "eyJpZCI6IjIwMzI1MjAifQ" }, "nodes": [ { "id": "gid://gitlab/ProjectSnippet/2154147", "title": "patch: encoding branchName in various GET requests", "description": "\nThis snippet contains suggested changes for branch KevSlashNull/gitlab-vscode-extension-fix-error-400-when-on-a-branch-that-has-special-chars (commit: f4e9e620914653b261c68b5c411ac39a9ebd093d).\n\nApply this snippet:\n\n- In VS Code with the GitLab Workflow extension installed:\n - Run `GitLab: Apply snippet patch` and select this snippet\n- Using the `git` command:\n - Download the `encoding branchName in various GET requests.patch` file to your project folder\n - In your project folder, run\n\n ~~~sh\n git apply 'encoding branchName in various GET requests.patch'\n ~~~\n\n*This snippet was created with the [GitLab Workflow VS Code extension](https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow).*\n", "blobs": { "nodes": [ { "name": "encoding branchName in various GET requests.patch", "path": "encoding branchName in various GET requests.patch", "rawPath": "/gitlab-org/gitlab-vscode-extension/-/snippets/2154147/raw/main/encoding%20branchName%20in%20various%20GET%20requests.patch" } ] } }, { "id": "gid://gitlab/ProjectSnippet/2110322", "title": "example test snippet", "description": "You can use the `GitLab: Insert snippet` command to paste this example test into your newly created test file.", "blobs": { "nodes": [ { "name": "test.js", "path": "test.js", "rawPath": "/gitlab-org/gitlab-vscode-extension/-/snippets/2110322/raw/master/test.js" } ] } }, { "id": "gid://gitlab/ProjectSnippet/2067095", "title": "Suggested OKR for Q2 2021", "description": null, "blobs": { "nodes": [ { "name": "okr.md", "path": "okr.md", "rawPath": "/gitlab-org/gitlab-vscode-extension/-/snippets/2067095/raw/master/okr.md" } ] } }, { "id": "gid://gitlab/ProjectSnippet/2050528", "title": "Launch configuration for debugging commit-lint CI job", "description": "Add this configuration to your `.vscode/launch.json` and you'll be able to debug the `scripts/commit-lint/lint.js` linting script.", "blobs": { "nodes": [ { "name": "launch.json", "path": "launch.json", "rawPath": "/gitlab-org/gitlab-vscode-extension/-/snippets/2050528/raw/master/launch.json" } ] } }, { "id": "gid://gitlab/ProjectSnippet/2050097", "title": "Parsing all available gitlab environment variables", "description": "This script parses all environment variables from the source of [our documentation](https://docs.gitlab.com/ee/ci/variables/predefined_variables.html).\n\n### Usage\n```sh\ncurl https://gitlab.com/gitlab-org/gitlab/-/raw/master/doc/ci/variables/predefined_variables.md | node index.js > ci_variables.json\n```", "blobs": { "nodes": [ { "name": "index.js", "path": "index.js", "rawPath": "/gitlab-org/gitlab-vscode-extension/-/snippets/2050097/raw/master/index.js" } ] } }, { "id": "gid://gitlab/ProjectSnippet/2032520", "title": "webview icons", "description": "These are the icons we use in `webview` subproject.\n\nhttps://gitlab.com/gitlab-org/gitlab-vscode-extension/-/blob/main/src/webview/src/assets/icons.js", "blobs": { "nodes": [ { "name": "icons.html", "path": "icons.html", "rawPath": "/gitlab-org/gitlab-vscode-extension/-/snippets/2032520/raw/master/icons.html" } ] } } ] } } } }I'm a bit used to these things because of forks (like the commit lint CI job etc.), so that's why I assumed it was because of project access.
😅 But yeah, this is a public project & snippet.🤦 -
👶 @viktomasAuthor Maintainer@KevSlashNull My best guess would be that your GitLab Workflow extension prefers your fork project over the "origin" (this project). Maybe you could use the
"gitlab.remoteName"setting to force the extension to use this project. E.g.{ "gitlab.remoteName": "origin" }
Please register or sign in to comment
