diff --git a/extensions/ql-vscode/src/mocks/scenarios/missing-controller-repo/0-getRepo.json b/extensions/ql-vscode/src/mocks/scenarios/missing-controller-repo/0-getRepo.json new file mode 100644 index 00000000000..8c01295c2a0 --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/missing-controller-repo/0-getRepo.json @@ -0,0 +1,11 @@ +{ + "request": { + "kind": "getRepo" + }, + "response": { + "status": 404, + "body": { + "message": "Repository not found" + } + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/0-getRepo.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/0-getRepo.json new file mode 100644 index 00000000000..a1fa60a031e --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/0-getRepo.json @@ -0,0 +1,159 @@ +{ + "request": { + "kind": "getRepo" + }, + "response": { + "status": 200, + "body": { + "id": 557804416, + "node_id": "R_kgDOIT9rgA", + "name": "mrva-demo-controller-repo", + "full_name": "github/mrva-demo-controller-repo", + "private": true, + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github/mrva-demo-controller-repo", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/github/mrva-demo-controller-repo", + "forks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/forks", + "keys_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/teams", + "hooks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/hooks", + "issue_events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/events{/number}", + "events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/events", + "assignees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/assignees{/user}", + "branches_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/branches{/branch}", + "tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/tags", + "blobs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/languages", + "stargazers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/stargazers", + "contributors_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contributors", + "subscribers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscribers", + "subscription_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscription", + "commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contents/{+path}", + "compare_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/merges", + "archive_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/downloads", + "issues_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues{/number}", + "pulls_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/labels{/name}", + "releases_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/releases{/id}", + "deployments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/deployments", + "created_at": "2022-10-26T10:37:59Z", + "updated_at": "2022-10-26T10:37:59Z", + "pushed_at": "2022-10-26T10:38:02Z", + "git_url": "git://github.com/github/mrva-demo-controller-repo.git", + "ssh_url": "git@github.com:github/mrva-demo-controller-repo.git", + "clone_url": "https://github.com/github/mrva-demo-controller-repo.git", + "svn_url": "https://github.com/github/mrva-demo-controller-repo", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": false, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "AACMDDJSXFX6QQXTSB4YQCDDLEWP4", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "organization": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "security_and_analysis": { + "advanced_security": { + "status": "enabled" + }, + "secret_scanning": { + "status": "enabled" + }, + "secret_scanning_push_protection": { + "status": "enabled" + } + }, + "network_count": 0, + "subscribers_count": 0 + } + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/1-submitVariantAnalysis.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/1-submitVariantAnalysis.json new file mode 100644 index 00000000000..a34ec7dab63 --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/1-submitVariantAnalysis.json @@ -0,0 +1,104 @@ +{ + "request": { + "kind": "submitVariantAnalysis" + }, + "response": { + "status": 201, + "body": { + "id": 146, + "controller_repo": { + "id": 557804416, + "node_id": "R_kgDOIT9rgA", + "name": "mrva-demo-controller-repo", + "full_name": "github/mrva-demo-controller-repo", + "private": true, + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github/mrva-demo-controller-repo", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/github/mrva-demo-controller-repo", + "forks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/forks", + "keys_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/teams", + "hooks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/hooks", + "issue_events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/events{/number}", + "events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/events", + "assignees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/assignees{/user}", + "branches_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/branches{/branch}", + "tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/tags", + "blobs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/languages", + "stargazers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/stargazers", + "contributors_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contributors", + "subscribers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscribers", + "subscription_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscription", + "commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contents/{+path}", + "compare_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/merges", + "archive_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/downloads", + "issues_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues{/number}", + "pulls_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/labels{/name}", + "releases_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/releases{/id}", + "deployments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/deployments" + }, + "actor": { + "login": "charisk", + "id": 311693, + "node_id": "MDQ6VXNlcjMxMTY5Mw==", + "avatar_url": "https://avatars.githubusercontent.com/u/311693?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/charisk", + "html_url": "https://github.com/charisk", + "followers_url": "https://api.github.com/users/charisk/followers", + "following_url": "https://api.github.com/users/charisk/following{/other_user}", + "gists_url": "https://api.github.com/users/charisk/gists{/gist_id}", + "starred_url": "https://api.github.com/users/charisk/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/charisk/subscriptions", + "organizations_url": "https://api.github.com/users/charisk/orgs", + "repos_url": "https://api.github.com/users/charisk/repos", + "events_url": "https://api.github.com/users/charisk/events{/privacy}", + "received_events_url": "https://api.github.com/users/charisk/received_events", + "type": "User", + "site_admin": true + }, + "query_language": "javascript", + "query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124513Z&X-Amz-Expires=3600&X-Amz-Signature=0f5f84090c84c1b915e47960bcbc6f66433cd345cdc81cc08669920b48f6b622&X-Amz-SignedHeaders=host", + "created_at": "2022-10-26T12:45:12Z", + "updated_at": "2022-10-26T12:45:13Z", + "status": "in_progress", + "skipped_repositories": {} + } + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/10-getVariantAnalysisRepoResult.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/10-getVariantAnalysisRepoResult.json new file mode 100644 index 00000000000..c72794ee4b8 --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/10-getVariantAnalysisRepoResult.json @@ -0,0 +1,11 @@ +{ + "request": { + "kind": "getVariantAnalysisRepoResult", + "repositoryId": 206444 + }, + "response": { + "status": 200, + "body": "file:17-getVariantAnalysisRepoResult.body.zip", + "contentType": "application/zip" + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/11-getVariantAnalysis.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/11-getVariantAnalysis.json new file mode 100644 index 00000000000..24dcf13835e --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/11-getVariantAnalysis.json @@ -0,0 +1,171 @@ +{ + "request": { + "kind": "getVariantAnalysis" + }, + "response": { + "status": 200, + "body": { + "id": 146, + "controller_repo": { + "id": 557804416, + "node_id": "R_kgDOIT9rgA", + "name": "mrva-demo-controller-repo", + "full_name": "github/mrva-demo-controller-repo", + "private": true, + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github/mrva-demo-controller-repo", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/github/mrva-demo-controller-repo", + "forks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/forks", + "keys_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/teams", + "hooks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/hooks", + "issue_events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/events{/number}", + "events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/events", + "assignees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/assignees{/user}", + "branches_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/branches{/branch}", + "tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/tags", + "blobs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/languages", + "stargazers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/stargazers", + "contributors_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contributors", + "subscribers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscribers", + "subscription_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscription", + "commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contents/{+path}", + "compare_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/merges", + "archive_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/downloads", + "issues_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues{/number}", + "pulls_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/labels{/name}", + "releases_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/releases{/id}", + "deployments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/deployments" + }, + "actor": { + "login": "charisk", + "id": 311693, + "node_id": "MDQ6VXNlcjMxMTY5Mw==", + "avatar_url": "https://avatars.githubusercontent.com/u/311693?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/charisk", + "html_url": "https://github.com/charisk", + "followers_url": "https://api.github.com/users/charisk/followers", + "following_url": "https://api.github.com/users/charisk/following{/other_user}", + "gists_url": "https://api.github.com/users/charisk/gists{/gist_id}", + "starred_url": "https://api.github.com/users/charisk/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/charisk/subscriptions", + "organizations_url": "https://api.github.com/users/charisk/orgs", + "repos_url": "https://api.github.com/users/charisk/repos", + "events_url": "https://api.github.com/users/charisk/events{/privacy}", + "received_events_url": "https://api.github.com/users/charisk/received_events", + "type": "User", + "site_admin": true + }, + "query_language": "javascript", + "query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124653Z&X-Amz-Expires=3600&X-Amz-Signature=2147ea8461603acdb32fc38544dffb62e74db12fbbe5a32f269420d4945841a1&X-Amz-SignedHeaders=host", + "created_at": "2022-10-26T12:45:12Z", + "updated_at": "2022-10-26T12:45:15Z", + "actions_workflow_run_id": 3329095282, + "status": "in_progress", + "scanned_repositories": [ + { + "repository": { + "id": 206444, + "name": "hive", + "full_name": "apache/hive", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 81841, + "result_count": 4 + }, + { + "repository": { + "id": 20753500, + "name": "ng-nice", + "full_name": "angular-cn/ng-nice", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 23418517, + "name": "hadoop", + "full_name": "apache/hadoop", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 66895, + "result_count": 3 + }, + { + "repository": { + "id": 236095576, + "name": "backstage", + "full_name": "backstage/backstage", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 257485422, + "name": "vite", + "full_name": "vitejs/vite", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 702, + "result_count": 0 + } + ], + "skipped_repositories": { + "access_mismatch_repos": { + "repository_count": 0, + "repositories": [] + }, + "no_codeql_db_repos": { + "repository_count": 0, + "repositories": [] + }, + "over_limit_repos": { + "repository_count": 0, + "repositories": [] + } + } + } + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/12-getVariantAnalysisRepo.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/12-getVariantAnalysisRepo.json new file mode 100644 index 00000000000..5507aa3357d --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/12-getVariantAnalysisRepo.json @@ -0,0 +1,84 @@ +{ + "request": { + "kind": "getVariantAnalysisRepo", + "repositoryId": 23418517 + }, + "response": { + "status": 200, + "body": { + "repository": { + "id": 23418517, + "node_id": "MDEwOlJlcG9zaXRvcnkyMzQxODUxNw==", + "name": "hadoop", + "full_name": "apache/hadoop", + "private": false, + "owner": { + "login": "apache", + "id": 47359, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjQ3MzU5", + "avatar_url": "https://avatars.githubusercontent.com/u/47359?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/apache", + "html_url": "https://github.com/apache", + "followers_url": "https://api.github.com/users/apache/followers", + "following_url": "https://api.github.com/users/apache/following{/other_user}", + "gists_url": "https://api.github.com/users/apache/gists{/gist_id}", + "starred_url": "https://api.github.com/users/apache/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/apache/subscriptions", + "organizations_url": "https://api.github.com/users/apache/orgs", + "repos_url": "https://api.github.com/users/apache/repos", + "events_url": "https://api.github.com/users/apache/events{/privacy}", + "received_events_url": "https://api.github.com/users/apache/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/apache/hadoop", + "description": "Apache Hadoop", + "fork": false, + "url": "https://api.github.com/repos/apache/hadoop", + "forks_url": "https://api.github.com/repos/apache/hadoop/forks", + "keys_url": "https://api.github.com/repos/apache/hadoop/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/apache/hadoop/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/apache/hadoop/teams", + "hooks_url": "https://api.github.com/repos/apache/hadoop/hooks", + "issue_events_url": "https://api.github.com/repos/apache/hadoop/issues/events{/number}", + "events_url": "https://api.github.com/repos/apache/hadoop/events", + "assignees_url": "https://api.github.com/repos/apache/hadoop/assignees{/user}", + "branches_url": "https://api.github.com/repos/apache/hadoop/branches{/branch}", + "tags_url": "https://api.github.com/repos/apache/hadoop/tags", + "blobs_url": "https://api.github.com/repos/apache/hadoop/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/apache/hadoop/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/apache/hadoop/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/apache/hadoop/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/apache/hadoop/statuses/{sha}", + "languages_url": "https://api.github.com/repos/apache/hadoop/languages", + "stargazers_url": "https://api.github.com/repos/apache/hadoop/stargazers", + "contributors_url": "https://api.github.com/repos/apache/hadoop/contributors", + "subscribers_url": "https://api.github.com/repos/apache/hadoop/subscribers", + "subscription_url": "https://api.github.com/repos/apache/hadoop/subscription", + "commits_url": "https://api.github.com/repos/apache/hadoop/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/apache/hadoop/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/apache/hadoop/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/apache/hadoop/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/apache/hadoop/contents/{+path}", + "compare_url": "https://api.github.com/repos/apache/hadoop/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/apache/hadoop/merges", + "archive_url": "https://api.github.com/repos/apache/hadoop/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/apache/hadoop/downloads", + "issues_url": "https://api.github.com/repos/apache/hadoop/issues{/number}", + "pulls_url": "https://api.github.com/repos/apache/hadoop/pulls{/number}", + "milestones_url": "https://api.github.com/repos/apache/hadoop/milestones{/number}", + "notifications_url": "https://api.github.com/repos/apache/hadoop/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/apache/hadoop/labels{/name}", + "releases_url": "https://api.github.com/repos/apache/hadoop/releases{/id}", + "deployments_url": "https://api.github.com/repos/apache/hadoop/deployments" + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 66895, + "result_count": 3, + "database_commit_sha": "aac87ffe76451c2fd535350b7aefb384e2be6241", + "source_location_prefix": "/home/runner/work/bulk-builder/bulk-builder", + "artifact_url": "https://objects-origin.githubusercontent.com/codeql-query-console/codeql-variant-analysis-repo-tasks/146/23418517/425ed1e9-c214-4f71-832d-798da3ed7452?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124654Z&X-Amz-Expires=300&X-Amz-Signature=98dc5dfcc4c70c4cc40fb62fb87a21671b1ee26266e8ade3109d6f39cfceef5a&X-Amz-SignedHeaders=host&actor_id=311693&key_id=0&repo_id=557804416" + } + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/13-getVariantAnalysisRepoResult.body.zip b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/13-getVariantAnalysisRepoResult.body.zip new file mode 100644 index 00000000000..bcff167d720 Binary files /dev/null and b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/13-getVariantAnalysisRepoResult.body.zip differ diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/13-getVariantAnalysisRepoResult.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/13-getVariantAnalysisRepoResult.json new file mode 100644 index 00000000000..a8c6cee5845 --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/13-getVariantAnalysisRepoResult.json @@ -0,0 +1,11 @@ +{ + "request": { + "kind": "getVariantAnalysisRepoResult", + "repositoryId": 23418517 + }, + "response": { + "status": 200, + "body": "file:13-getVariantAnalysisRepoResult.body.zip", + "contentType": "application/zip" + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/14-getVariantAnalysisRepo.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/14-getVariantAnalysisRepo.json new file mode 100644 index 00000000000..55320dbca82 --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/14-getVariantAnalysisRepo.json @@ -0,0 +1,84 @@ +{ + "request": { + "kind": "getVariantAnalysisRepo", + "repositoryId": 257485422 + }, + "response": { + "status": 200, + "body": { + "repository": { + "id": 257485422, + "node_id": "MDEwOlJlcG9zaXRvcnkyNTc0ODU0MjI=", + "name": "vite", + "full_name": "vitejs/vite", + "private": false, + "owner": { + "login": "vitejs", + "id": 65625612, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjY1NjI1NjEy", + "avatar_url": "https://avatars.githubusercontent.com/u/65625612?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/vitejs", + "html_url": "https://github.com/vitejs", + "followers_url": "https://api.github.com/users/vitejs/followers", + "following_url": "https://api.github.com/users/vitejs/following{/other_user}", + "gists_url": "https://api.github.com/users/vitejs/gists{/gist_id}", + "starred_url": "https://api.github.com/users/vitejs/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/vitejs/subscriptions", + "organizations_url": "https://api.github.com/users/vitejs/orgs", + "repos_url": "https://api.github.com/users/vitejs/repos", + "events_url": "https://api.github.com/users/vitejs/events{/privacy}", + "received_events_url": "https://api.github.com/users/vitejs/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/vitejs/vite", + "description": "Next generation frontend tooling. It's fast!", + "fork": false, + "url": "https://api.github.com/repos/vitejs/vite", + "forks_url": "https://api.github.com/repos/vitejs/vite/forks", + "keys_url": "https://api.github.com/repos/vitejs/vite/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/vitejs/vite/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/vitejs/vite/teams", + "hooks_url": "https://api.github.com/repos/vitejs/vite/hooks", + "issue_events_url": "https://api.github.com/repos/vitejs/vite/issues/events{/number}", + "events_url": "https://api.github.com/repos/vitejs/vite/events", + "assignees_url": "https://api.github.com/repos/vitejs/vite/assignees{/user}", + "branches_url": "https://api.github.com/repos/vitejs/vite/branches{/branch}", + "tags_url": "https://api.github.com/repos/vitejs/vite/tags", + "blobs_url": "https://api.github.com/repos/vitejs/vite/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/vitejs/vite/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/vitejs/vite/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/vitejs/vite/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/vitejs/vite/statuses/{sha}", + "languages_url": "https://api.github.com/repos/vitejs/vite/languages", + "stargazers_url": "https://api.github.com/repos/vitejs/vite/stargazers", + "contributors_url": "https://api.github.com/repos/vitejs/vite/contributors", + "subscribers_url": "https://api.github.com/repos/vitejs/vite/subscribers", + "subscription_url": "https://api.github.com/repos/vitejs/vite/subscription", + "commits_url": "https://api.github.com/repos/vitejs/vite/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/vitejs/vite/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/vitejs/vite/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/vitejs/vite/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/vitejs/vite/contents/{+path}", + "compare_url": "https://api.github.com/repos/vitejs/vite/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/vitejs/vite/merges", + "archive_url": "https://api.github.com/repos/vitejs/vite/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/vitejs/vite/downloads", + "issues_url": "https://api.github.com/repos/vitejs/vite/issues{/number}", + "pulls_url": "https://api.github.com/repos/vitejs/vite/pulls{/number}", + "milestones_url": "https://api.github.com/repos/vitejs/vite/milestones{/number}", + "notifications_url": "https://api.github.com/repos/vitejs/vite/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/vitejs/vite/labels{/name}", + "releases_url": "https://api.github.com/repos/vitejs/vite/releases{/id}", + "deployments_url": "https://api.github.com/repos/vitejs/vite/deployments" + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 702, + "result_count": 0, + "database_commit_sha": "de6323f460dd3e7e3edf97443ece2acce6187ea0", + "source_location_prefix": "/home/runner/work/bulk-builder/bulk-builder", + "artifact_url": "https://objects-origin.githubusercontent.com/codeql-query-console/codeql-variant-analysis-repo-tasks/146/257485422/862ee5f1-0e34-4997-a60e-b97cea3eadc9?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124658Z&X-Amz-Expires=300&X-Amz-Signature=df0ac0f0f8f746ad977ad859bc6b43e4cdc74ff285a33cba489b16bf9c161490&X-Amz-SignedHeaders=host&actor_id=311693&key_id=0&repo_id=557804416" + } + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/15-getVariantAnalysisRepoResult.body.zip b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/15-getVariantAnalysisRepoResult.body.zip new file mode 100644 index 00000000000..39a53c30455 Binary files /dev/null and b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/15-getVariantAnalysisRepoResult.body.zip differ diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/15-getVariantAnalysisRepoResult.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/15-getVariantAnalysisRepoResult.json new file mode 100644 index 00000000000..0c1c7b6c384 --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/15-getVariantAnalysisRepoResult.json @@ -0,0 +1,11 @@ +{ + "request": { + "kind": "getVariantAnalysisRepoResult", + "repositoryId": 257485422 + }, + "response": { + "status": 200, + "body": "file:15-getVariantAnalysisRepoResult.body.zip", + "contentType": "application/zip" + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/16-getVariantAnalysis.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/16-getVariantAnalysis.json new file mode 100644 index 00000000000..8c37b721841 --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/16-getVariantAnalysis.json @@ -0,0 +1,171 @@ +{ + "request": { + "kind": "getVariantAnalysis" + }, + "response": { + "status": 200, + "body": { + "id": 146, + "controller_repo": { + "id": 557804416, + "node_id": "R_kgDOIT9rgA", + "name": "mrva-demo-controller-repo", + "full_name": "github/mrva-demo-controller-repo", + "private": true, + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github/mrva-demo-controller-repo", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/github/mrva-demo-controller-repo", + "forks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/forks", + "keys_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/teams", + "hooks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/hooks", + "issue_events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/events{/number}", + "events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/events", + "assignees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/assignees{/user}", + "branches_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/branches{/branch}", + "tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/tags", + "blobs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/languages", + "stargazers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/stargazers", + "contributors_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contributors", + "subscribers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscribers", + "subscription_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscription", + "commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contents/{+path}", + "compare_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/merges", + "archive_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/downloads", + "issues_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues{/number}", + "pulls_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/labels{/name}", + "releases_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/releases{/id}", + "deployments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/deployments" + }, + "actor": { + "login": "charisk", + "id": 311693, + "node_id": "MDQ6VXNlcjMxMTY5Mw==", + "avatar_url": "https://avatars.githubusercontent.com/u/311693?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/charisk", + "html_url": "https://github.com/charisk", + "followers_url": "https://api.github.com/users/charisk/followers", + "following_url": "https://api.github.com/users/charisk/following{/other_user}", + "gists_url": "https://api.github.com/users/charisk/gists{/gist_id}", + "starred_url": "https://api.github.com/users/charisk/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/charisk/subscriptions", + "organizations_url": "https://api.github.com/users/charisk/orgs", + "repos_url": "https://api.github.com/users/charisk/repos", + "events_url": "https://api.github.com/users/charisk/events{/privacy}", + "received_events_url": "https://api.github.com/users/charisk/received_events", + "type": "User", + "site_admin": true + }, + "query_language": "javascript", + "query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124659Z&X-Amz-Expires=3600&X-Amz-Signature=b791ede467cd1783d31d7ee148763d0d4f9eb7abad7506ef9c25017c94aaa1df&X-Amz-SignedHeaders=host", + "created_at": "2022-10-26T12:45:12Z", + "updated_at": "2022-10-26T12:45:15Z", + "actions_workflow_run_id": 3329095282, + "status": "in_progress", + "scanned_repositories": [ + { + "repository": { + "id": 206444, + "name": "hive", + "full_name": "apache/hive", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 81841, + "result_count": 4 + }, + { + "repository": { + "id": 20753500, + "name": "ng-nice", + "full_name": "angular-cn/ng-nice", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 23418517, + "name": "hadoop", + "full_name": "apache/hadoop", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 66895, + "result_count": 3 + }, + { + "repository": { + "id": 236095576, + "name": "backstage", + "full_name": "backstage/backstage", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 257485422, + "name": "vite", + "full_name": "vitejs/vite", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 702, + "result_count": 0 + } + ], + "skipped_repositories": { + "access_mismatch_repos": { + "repository_count": 0, + "repositories": [] + }, + "no_codeql_db_repos": { + "repository_count": 0, + "repositories": [] + }, + "over_limit_repos": { + "repository_count": 0, + "repositories": [] + } + } + } + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/17-getVariantAnalysis.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/17-getVariantAnalysis.json new file mode 100644 index 00000000000..4c200bd4be8 --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/17-getVariantAnalysis.json @@ -0,0 +1,171 @@ +{ + "request": { + "kind": "getVariantAnalysis" + }, + "response": { + "status": 200, + "body": { + "id": 146, + "controller_repo": { + "id": 557804416, + "node_id": "R_kgDOIT9rgA", + "name": "mrva-demo-controller-repo", + "full_name": "github/mrva-demo-controller-repo", + "private": true, + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github/mrva-demo-controller-repo", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/github/mrva-demo-controller-repo", + "forks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/forks", + "keys_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/teams", + "hooks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/hooks", + "issue_events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/events{/number}", + "events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/events", + "assignees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/assignees{/user}", + "branches_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/branches{/branch}", + "tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/tags", + "blobs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/languages", + "stargazers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/stargazers", + "contributors_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contributors", + "subscribers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscribers", + "subscription_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscription", + "commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contents/{+path}", + "compare_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/merges", + "archive_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/downloads", + "issues_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues{/number}", + "pulls_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/labels{/name}", + "releases_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/releases{/id}", + "deployments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/deployments" + }, + "actor": { + "login": "charisk", + "id": 311693, + "node_id": "MDQ6VXNlcjMxMTY5Mw==", + "avatar_url": "https://avatars.githubusercontent.com/u/311693?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/charisk", + "html_url": "https://github.com/charisk", + "followers_url": "https://api.github.com/users/charisk/followers", + "following_url": "https://api.github.com/users/charisk/following{/other_user}", + "gists_url": "https://api.github.com/users/charisk/gists{/gist_id}", + "starred_url": "https://api.github.com/users/charisk/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/charisk/subscriptions", + "organizations_url": "https://api.github.com/users/charisk/orgs", + "repos_url": "https://api.github.com/users/charisk/repos", + "events_url": "https://api.github.com/users/charisk/events{/privacy}", + "received_events_url": "https://api.github.com/users/charisk/received_events", + "type": "User", + "site_admin": true + }, + "query_language": "javascript", + "query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124705Z&X-Amz-Expires=3600&X-Amz-Signature=dae9aa87c393b62ad6f84fd280c731fcd8e4551917920bf978eac5dd6102caec&X-Amz-SignedHeaders=host", + "created_at": "2022-10-26T12:45:12Z", + "updated_at": "2022-10-26T12:45:15Z", + "actions_workflow_run_id": 3329095282, + "status": "in_progress", + "scanned_repositories": [ + { + "repository": { + "id": 206444, + "name": "hive", + "full_name": "apache/hive", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 81841, + "result_count": 4 + }, + { + "repository": { + "id": 20753500, + "name": "ng-nice", + "full_name": "angular-cn/ng-nice", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 23418517, + "name": "hadoop", + "full_name": "apache/hadoop", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 66895, + "result_count": 3 + }, + { + "repository": { + "id": 236095576, + "name": "backstage", + "full_name": "backstage/backstage", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 257485422, + "name": "vite", + "full_name": "vitejs/vite", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 702, + "result_count": 0 + } + ], + "skipped_repositories": { + "access_mismatch_repos": { + "repository_count": 0, + "repositories": [] + }, + "no_codeql_db_repos": { + "repository_count": 0, + "repositories": [] + }, + "over_limit_repos": { + "repository_count": 0, + "repositories": [] + } + } + } + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/17-getVariantAnalysisRepoResult.body.zip b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/17-getVariantAnalysisRepoResult.body.zip new file mode 100644 index 00000000000..4eb4583670d Binary files /dev/null and b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/17-getVariantAnalysisRepoResult.body.zip differ diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/18-getVariantAnalysis.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/18-getVariantAnalysis.json new file mode 100644 index 00000000000..9948d3d56ff --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/18-getVariantAnalysis.json @@ -0,0 +1,173 @@ +{ + "request": { + "kind": "getVariantAnalysis" + }, + "response": { + "status": 200, + "body": { + "id": 146, + "controller_repo": { + "id": 557804416, + "node_id": "R_kgDOIT9rgA", + "name": "mrva-demo-controller-repo", + "full_name": "github/mrva-demo-controller-repo", + "private": true, + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github/mrva-demo-controller-repo", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/github/mrva-demo-controller-repo", + "forks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/forks", + "keys_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/teams", + "hooks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/hooks", + "issue_events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/events{/number}", + "events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/events", + "assignees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/assignees{/user}", + "branches_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/branches{/branch}", + "tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/tags", + "blobs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/languages", + "stargazers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/stargazers", + "contributors_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contributors", + "subscribers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscribers", + "subscription_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscription", + "commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contents/{+path}", + "compare_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/merges", + "archive_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/downloads", + "issues_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues{/number}", + "pulls_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/labels{/name}", + "releases_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/releases{/id}", + "deployments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/deployments" + }, + "actor": { + "login": "charisk", + "id": 311693, + "node_id": "MDQ6VXNlcjMxMTY5Mw==", + "avatar_url": "https://avatars.githubusercontent.com/u/311693?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/charisk", + "html_url": "https://github.com/charisk", + "followers_url": "https://api.github.com/users/charisk/followers", + "following_url": "https://api.github.com/users/charisk/following{/other_user}", + "gists_url": "https://api.github.com/users/charisk/gists{/gist_id}", + "starred_url": "https://api.github.com/users/charisk/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/charisk/subscriptions", + "organizations_url": "https://api.github.com/users/charisk/orgs", + "repos_url": "https://api.github.com/users/charisk/repos", + "events_url": "https://api.github.com/users/charisk/events{/privacy}", + "received_events_url": "https://api.github.com/users/charisk/received_events", + "type": "User", + "site_admin": true + }, + "query_language": "javascript", + "query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124726Z&X-Amz-Expires=3600&X-Amz-Signature=6698289315bd8d8378a17784ba0be9955e6e9161497137c4ccb29b1d2a3f3587&X-Amz-SignedHeaders=host", + "created_at": "2022-10-26T12:45:12Z", + "updated_at": "2022-10-26T12:45:15Z", + "actions_workflow_run_id": 3329095282, + "status": "in_progress", + "scanned_repositories": [ + { + "repository": { + "id": 206444, + "name": "hive", + "full_name": "apache/hive", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 81841, + "result_count": 4 + }, + { + "repository": { + "id": 20753500, + "name": "ng-nice", + "full_name": "angular-cn/ng-nice", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 156706, + "result_count": 8 + }, + { + "repository": { + "id": 23418517, + "name": "hadoop", + "full_name": "apache/hadoop", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 66895, + "result_count": 3 + }, + { + "repository": { + "id": 236095576, + "name": "backstage", + "full_name": "backstage/backstage", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 257485422, + "name": "vite", + "full_name": "vitejs/vite", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 702, + "result_count": 0 + } + ], + "skipped_repositories": { + "access_mismatch_repos": { + "repository_count": 0, + "repositories": [] + }, + "no_codeql_db_repos": { + "repository_count": 0, + "repositories": [] + }, + "over_limit_repos": { + "repository_count": 0, + "repositories": [] + } + } + } + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/19-getVariantAnalysisRepo.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/19-getVariantAnalysisRepo.json new file mode 100644 index 00000000000..d79fc358504 --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/19-getVariantAnalysisRepo.json @@ -0,0 +1,84 @@ +{ + "request": { + "kind": "getVariantAnalysisRepo", + "repositoryId": 20753500 + }, + "response": { + "status": 200, + "body": { + "repository": { + "id": 20753500, + "node_id": "MDEwOlJlcG9zaXRvcnkyMDc1MzUwMA==", + "name": "ng-nice", + "full_name": "angular-cn/ng-nice", + "private": false, + "owner": { + "login": "angular-cn", + "id": 6211039, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjYyMTEwMzk=", + "avatar_url": "https://avatars.githubusercontent.com/u/6211039?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/angular-cn", + "html_url": "https://github.com/angular-cn", + "followers_url": "https://api.github.com/users/angular-cn/followers", + "following_url": "https://api.github.com/users/angular-cn/following{/other_user}", + "gists_url": "https://api.github.com/users/angular-cn/gists{/gist_id}", + "starred_url": "https://api.github.com/users/angular-cn/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/angular-cn/subscriptions", + "organizations_url": "https://api.github.com/users/angular-cn/orgs", + "repos_url": "https://api.github.com/users/angular-cn/repos", + "events_url": "https://api.github.com/users/angular-cn/events{/privacy}", + "received_events_url": "https://api.github.com/users/angular-cn/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/angular-cn/ng-nice", + "description": "NgNice Web Site http://ngnice.com", + "fork": false, + "url": "https://api.github.com/repos/angular-cn/ng-nice", + "forks_url": "https://api.github.com/repos/angular-cn/ng-nice/forks", + "keys_url": "https://api.github.com/repos/angular-cn/ng-nice/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/angular-cn/ng-nice/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/angular-cn/ng-nice/teams", + "hooks_url": "https://api.github.com/repos/angular-cn/ng-nice/hooks", + "issue_events_url": "https://api.github.com/repos/angular-cn/ng-nice/issues/events{/number}", + "events_url": "https://api.github.com/repos/angular-cn/ng-nice/events", + "assignees_url": "https://api.github.com/repos/angular-cn/ng-nice/assignees{/user}", + "branches_url": "https://api.github.com/repos/angular-cn/ng-nice/branches{/branch}", + "tags_url": "https://api.github.com/repos/angular-cn/ng-nice/tags", + "blobs_url": "https://api.github.com/repos/angular-cn/ng-nice/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/angular-cn/ng-nice/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/angular-cn/ng-nice/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/angular-cn/ng-nice/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/angular-cn/ng-nice/statuses/{sha}", + "languages_url": "https://api.github.com/repos/angular-cn/ng-nice/languages", + "stargazers_url": "https://api.github.com/repos/angular-cn/ng-nice/stargazers", + "contributors_url": "https://api.github.com/repos/angular-cn/ng-nice/contributors", + "subscribers_url": "https://api.github.com/repos/angular-cn/ng-nice/subscribers", + "subscription_url": "https://api.github.com/repos/angular-cn/ng-nice/subscription", + "commits_url": "https://api.github.com/repos/angular-cn/ng-nice/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/angular-cn/ng-nice/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/angular-cn/ng-nice/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/angular-cn/ng-nice/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/angular-cn/ng-nice/contents/{+path}", + "compare_url": "https://api.github.com/repos/angular-cn/ng-nice/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/angular-cn/ng-nice/merges", + "archive_url": "https://api.github.com/repos/angular-cn/ng-nice/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/angular-cn/ng-nice/downloads", + "issues_url": "https://api.github.com/repos/angular-cn/ng-nice/issues{/number}", + "pulls_url": "https://api.github.com/repos/angular-cn/ng-nice/pulls{/number}", + "milestones_url": "https://api.github.com/repos/angular-cn/ng-nice/milestones{/number}", + "notifications_url": "https://api.github.com/repos/angular-cn/ng-nice/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/angular-cn/ng-nice/labels{/name}", + "releases_url": "https://api.github.com/repos/angular-cn/ng-nice/releases{/id}", + "deployments_url": "https://api.github.com/repos/angular-cn/ng-nice/deployments" + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 156706, + "result_count": 8, + "database_commit_sha": "85f9118fa7c10395eb01b019ba57680805897efa", + "source_location_prefix": "/home/runner/work/bulk-builder/bulk-builder", + "artifact_url": "https://objects-origin.githubusercontent.com/codeql-query-console/codeql-variant-analysis-repo-tasks/146/20753500/7cb3d923-6312-4453-8df2-e98382437ddd?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124729Z&X-Amz-Expires=300&X-Amz-Signature=d8e403e6ed13e7ce8b305d07be139e3ffac8a26f2e010acdbeaf9365588ab17f&X-Amz-SignedHeaders=host&actor_id=311693&key_id=0&repo_id=557804416" + } + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/2-getVariantAnalysis.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/2-getVariantAnalysis.json new file mode 100644 index 00000000000..e65cab8cfb6 --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/2-getVariantAnalysis.json @@ -0,0 +1,165 @@ +{ + "request": { + "kind": "getVariantAnalysis" + }, + "response": { + "status": 200, + "body": { + "id": 146, + "controller_repo": { + "id": 557804416, + "node_id": "R_kgDOIT9rgA", + "name": "mrva-demo-controller-repo", + "full_name": "github/mrva-demo-controller-repo", + "private": true, + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github/mrva-demo-controller-repo", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/github/mrva-demo-controller-repo", + "forks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/forks", + "keys_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/teams", + "hooks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/hooks", + "issue_events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/events{/number}", + "events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/events", + "assignees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/assignees{/user}", + "branches_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/branches{/branch}", + "tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/tags", + "blobs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/languages", + "stargazers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/stargazers", + "contributors_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contributors", + "subscribers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscribers", + "subscription_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscription", + "commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contents/{+path}", + "compare_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/merges", + "archive_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/downloads", + "issues_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues{/number}", + "pulls_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/labels{/name}", + "releases_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/releases{/id}", + "deployments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/deployments" + }, + "actor": { + "login": "charisk", + "id": 311693, + "node_id": "MDQ6VXNlcjMxMTY5Mw==", + "avatar_url": "https://avatars.githubusercontent.com/u/311693?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/charisk", + "html_url": "https://github.com/charisk", + "followers_url": "https://api.github.com/users/charisk/followers", + "following_url": "https://api.github.com/users/charisk/following{/other_user}", + "gists_url": "https://api.github.com/users/charisk/gists{/gist_id}", + "starred_url": "https://api.github.com/users/charisk/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/charisk/subscriptions", + "organizations_url": "https://api.github.com/users/charisk/orgs", + "repos_url": "https://api.github.com/users/charisk/repos", + "events_url": "https://api.github.com/users/charisk/events{/privacy}", + "received_events_url": "https://api.github.com/users/charisk/received_events", + "type": "User", + "site_admin": true + }, + "query_language": "javascript", + "query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124518Z&X-Amz-Expires=3600&X-Amz-Signature=5fbb5b3fa99984d065d3229c83f19cb9741218e6e1ba5b7bb81a7d6df88cb66b&X-Amz-SignedHeaders=host", + "created_at": "2022-10-26T12:45:12Z", + "updated_at": "2022-10-26T12:45:15Z", + "actions_workflow_run_id": 3329095282, + "status": "in_progress", + "scanned_repositories": [ + { + "repository": { + "id": 206444, + "name": "hive", + "full_name": "apache/hive", + "private": false + }, + "analysis_status": "pending" + }, + { + "repository": { + "id": 20753500, + "name": "ng-nice", + "full_name": "angular-cn/ng-nice", + "private": false + }, + "analysis_status": "pending" + }, + { + "repository": { + "id": 23418517, + "name": "hadoop", + "full_name": "apache/hadoop", + "private": false + }, + "analysis_status": "pending" + }, + { + "repository": { + "id": 236095576, + "name": "backstage", + "full_name": "backstage/backstage", + "private": false + }, + "analysis_status": "pending" + }, + { + "repository": { + "id": 257485422, + "name": "vite", + "full_name": "vitejs/vite", + "private": false + }, + "analysis_status": "pending" + } + ], + "skipped_repositories": { + "access_mismatch_repos": { + "repository_count": 0, + "repositories": [] + }, + "no_codeql_db_repos": { + "repository_count": 0, + "repositories": [] + }, + "over_limit_repos": { + "repository_count": 0, + "repositories": [] + } + } + } + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/20-getVariantAnalysisRepoResult.body.zip b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/20-getVariantAnalysisRepoResult.body.zip new file mode 100644 index 00000000000..8c728bf0582 Binary files /dev/null and b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/20-getVariantAnalysisRepoResult.body.zip differ diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/20-getVariantAnalysisRepoResult.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/20-getVariantAnalysisRepoResult.json new file mode 100644 index 00000000000..209b0fca0e8 --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/20-getVariantAnalysisRepoResult.json @@ -0,0 +1,11 @@ +{ + "request": { + "kind": "getVariantAnalysisRepoResult", + "repositoryId": 20753500 + }, + "response": { + "status": 200, + "body": "file:20-getVariantAnalysisRepoResult.body.zip", + "contentType": "application/zip" + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/21-getVariantAnalysis.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/21-getVariantAnalysis.json new file mode 100644 index 00000000000..a34ca10e0b9 --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/21-getVariantAnalysis.json @@ -0,0 +1,173 @@ +{ + "request": { + "kind": "getVariantAnalysis" + }, + "response": { + "status": 200, + "body": { + "id": 146, + "controller_repo": { + "id": 557804416, + "node_id": "R_kgDOIT9rgA", + "name": "mrva-demo-controller-repo", + "full_name": "github/mrva-demo-controller-repo", + "private": true, + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github/mrva-demo-controller-repo", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/github/mrva-demo-controller-repo", + "forks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/forks", + "keys_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/teams", + "hooks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/hooks", + "issue_events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/events{/number}", + "events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/events", + "assignees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/assignees{/user}", + "branches_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/branches{/branch}", + "tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/tags", + "blobs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/languages", + "stargazers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/stargazers", + "contributors_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contributors", + "subscribers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscribers", + "subscription_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscription", + "commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contents/{+path}", + "compare_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/merges", + "archive_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/downloads", + "issues_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues{/number}", + "pulls_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/labels{/name}", + "releases_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/releases{/id}", + "deployments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/deployments" + }, + "actor": { + "login": "charisk", + "id": 311693, + "node_id": "MDQ6VXNlcjMxMTY5Mw==", + "avatar_url": "https://avatars.githubusercontent.com/u/311693?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/charisk", + "html_url": "https://github.com/charisk", + "followers_url": "https://api.github.com/users/charisk/followers", + "following_url": "https://api.github.com/users/charisk/following{/other_user}", + "gists_url": "https://api.github.com/users/charisk/gists{/gist_id}", + "starred_url": "https://api.github.com/users/charisk/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/charisk/subscriptions", + "organizations_url": "https://api.github.com/users/charisk/orgs", + "repos_url": "https://api.github.com/users/charisk/repos", + "events_url": "https://api.github.com/users/charisk/events{/privacy}", + "received_events_url": "https://api.github.com/users/charisk/received_events", + "type": "User", + "site_admin": true + }, + "query_language": "javascript", + "query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124732Z&X-Amz-Expires=3600&X-Amz-Signature=ad791eb1a754f473a50454616e9bd04663dfed60a5c84f2c61f27ced47ee25d0&X-Amz-SignedHeaders=host", + "created_at": "2022-10-26T12:45:12Z", + "updated_at": "2022-10-26T12:45:15Z", + "actions_workflow_run_id": 3329095282, + "status": "in_progress", + "scanned_repositories": [ + { + "repository": { + "id": 206444, + "name": "hive", + "full_name": "apache/hive", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 81841, + "result_count": 4 + }, + { + "repository": { + "id": 20753500, + "name": "ng-nice", + "full_name": "angular-cn/ng-nice", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 156706, + "result_count": 8 + }, + { + "repository": { + "id": 23418517, + "name": "hadoop", + "full_name": "apache/hadoop", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 66895, + "result_count": 3 + }, + { + "repository": { + "id": 236095576, + "name": "backstage", + "full_name": "backstage/backstage", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 257485422, + "name": "vite", + "full_name": "vitejs/vite", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 702, + "result_count": 0 + } + ], + "skipped_repositories": { + "access_mismatch_repos": { + "repository_count": 0, + "repositories": [] + }, + "no_codeql_db_repos": { + "repository_count": 0, + "repositories": [] + }, + "over_limit_repos": { + "repository_count": 0, + "repositories": [] + } + } + } + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/22-getVariantAnalysis.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/22-getVariantAnalysis.json new file mode 100644 index 00000000000..830f99e60fa --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/22-getVariantAnalysis.json @@ -0,0 +1,173 @@ +{ + "request": { + "kind": "getVariantAnalysis" + }, + "response": { + "status": 200, + "body": { + "id": 146, + "controller_repo": { + "id": 557804416, + "node_id": "R_kgDOIT9rgA", + "name": "mrva-demo-controller-repo", + "full_name": "github/mrva-demo-controller-repo", + "private": true, + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github/mrva-demo-controller-repo", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/github/mrva-demo-controller-repo", + "forks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/forks", + "keys_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/teams", + "hooks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/hooks", + "issue_events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/events{/number}", + "events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/events", + "assignees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/assignees{/user}", + "branches_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/branches{/branch}", + "tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/tags", + "blobs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/languages", + "stargazers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/stargazers", + "contributors_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contributors", + "subscribers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscribers", + "subscription_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscription", + "commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contents/{+path}", + "compare_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/merges", + "archive_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/downloads", + "issues_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues{/number}", + "pulls_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/labels{/name}", + "releases_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/releases{/id}", + "deployments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/deployments" + }, + "actor": { + "login": "charisk", + "id": 311693, + "node_id": "MDQ6VXNlcjMxMTY5Mw==", + "avatar_url": "https://avatars.githubusercontent.com/u/311693?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/charisk", + "html_url": "https://github.com/charisk", + "followers_url": "https://api.github.com/users/charisk/followers", + "following_url": "https://api.github.com/users/charisk/following{/other_user}", + "gists_url": "https://api.github.com/users/charisk/gists{/gist_id}", + "starred_url": "https://api.github.com/users/charisk/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/charisk/subscriptions", + "organizations_url": "https://api.github.com/users/charisk/orgs", + "repos_url": "https://api.github.com/users/charisk/repos", + "events_url": "https://api.github.com/users/charisk/events{/privacy}", + "received_events_url": "https://api.github.com/users/charisk/received_events", + "type": "User", + "site_admin": true + }, + "query_language": "javascript", + "query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124759Z&X-Amz-Expires=3600&X-Amz-Signature=5b0be34c426152c37e3d4c761bf576a07c9d4bb6222f32c438e02605600f0394&X-Amz-SignedHeaders=host", + "created_at": "2022-10-26T12:45:12Z", + "updated_at": "2022-10-26T12:45:15Z", + "actions_workflow_run_id": 3329095282, + "status": "in_progress", + "scanned_repositories": [ + { + "repository": { + "id": 206444, + "name": "hive", + "full_name": "apache/hive", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 81841, + "result_count": 4 + }, + { + "repository": { + "id": 20753500, + "name": "ng-nice", + "full_name": "angular-cn/ng-nice", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 156706, + "result_count": 8 + }, + { + "repository": { + "id": 23418517, + "name": "hadoop", + "full_name": "apache/hadoop", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 66895, + "result_count": 3 + }, + { + "repository": { + "id": 236095576, + "name": "backstage", + "full_name": "backstage/backstage", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 257485422, + "name": "vite", + "full_name": "vitejs/vite", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 702, + "result_count": 0 + } + ], + "skipped_repositories": { + "access_mismatch_repos": { + "repository_count": 0, + "repositories": [] + }, + "no_codeql_db_repos": { + "repository_count": 0, + "repositories": [] + }, + "over_limit_repos": { + "repository_count": 0, + "repositories": [] + } + } + } + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/23-getVariantAnalysis.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/23-getVariantAnalysis.json new file mode 100644 index 00000000000..c973274c3b7 --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/23-getVariantAnalysis.json @@ -0,0 +1,173 @@ +{ + "request": { + "kind": "getVariantAnalysis" + }, + "response": { + "status": 200, + "body": { + "id": 146, + "controller_repo": { + "id": 557804416, + "node_id": "R_kgDOIT9rgA", + "name": "mrva-demo-controller-repo", + "full_name": "github/mrva-demo-controller-repo", + "private": true, + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github/mrva-demo-controller-repo", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/github/mrva-demo-controller-repo", + "forks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/forks", + "keys_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/teams", + "hooks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/hooks", + "issue_events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/events{/number}", + "events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/events", + "assignees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/assignees{/user}", + "branches_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/branches{/branch}", + "tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/tags", + "blobs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/languages", + "stargazers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/stargazers", + "contributors_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contributors", + "subscribers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscribers", + "subscription_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscription", + "commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contents/{+path}", + "compare_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/merges", + "archive_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/downloads", + "issues_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues{/number}", + "pulls_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/labels{/name}", + "releases_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/releases{/id}", + "deployments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/deployments" + }, + "actor": { + "login": "charisk", + "id": 311693, + "node_id": "MDQ6VXNlcjMxMTY5Mw==", + "avatar_url": "https://avatars.githubusercontent.com/u/311693?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/charisk", + "html_url": "https://github.com/charisk", + "followers_url": "https://api.github.com/users/charisk/followers", + "following_url": "https://api.github.com/users/charisk/following{/other_user}", + "gists_url": "https://api.github.com/users/charisk/gists{/gist_id}", + "starred_url": "https://api.github.com/users/charisk/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/charisk/subscriptions", + "organizations_url": "https://api.github.com/users/charisk/orgs", + "repos_url": "https://api.github.com/users/charisk/repos", + "events_url": "https://api.github.com/users/charisk/events{/privacy}", + "received_events_url": "https://api.github.com/users/charisk/received_events", + "type": "User", + "site_admin": true + }, + "query_language": "javascript", + "query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124805Z&X-Amz-Expires=3600&X-Amz-Signature=73b43f47ee53938b91fa7d23c33e750c466fff777ea94ceb052771ee8dc25b6c&X-Amz-SignedHeaders=host", + "created_at": "2022-10-26T12:45:12Z", + "updated_at": "2022-10-26T12:45:15Z", + "actions_workflow_run_id": 3329095282, + "status": "in_progress", + "scanned_repositories": [ + { + "repository": { + "id": 206444, + "name": "hive", + "full_name": "apache/hive", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 81841, + "result_count": 4 + }, + { + "repository": { + "id": 20753500, + "name": "ng-nice", + "full_name": "angular-cn/ng-nice", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 156706, + "result_count": 8 + }, + { + "repository": { + "id": 23418517, + "name": "hadoop", + "full_name": "apache/hadoop", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 66895, + "result_count": 3 + }, + { + "repository": { + "id": 236095576, + "name": "backstage", + "full_name": "backstage/backstage", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 257485422, + "name": "vite", + "full_name": "vitejs/vite", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 702, + "result_count": 0 + } + ], + "skipped_repositories": { + "access_mismatch_repos": { + "repository_count": 0, + "repositories": [] + }, + "no_codeql_db_repos": { + "repository_count": 0, + "repositories": [] + }, + "over_limit_repos": { + "repository_count": 0, + "repositories": [] + } + } + } + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/24-getVariantAnalysis.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/24-getVariantAnalysis.json new file mode 100644 index 00000000000..e9249a603b7 --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/24-getVariantAnalysis.json @@ -0,0 +1,175 @@ +{ + "request": { + "kind": "getVariantAnalysis" + }, + "response": { + "status": 200, + "body": { + "id": 146, + "controller_repo": { + "id": 557804416, + "node_id": "R_kgDOIT9rgA", + "name": "mrva-demo-controller-repo", + "full_name": "github/mrva-demo-controller-repo", + "private": true, + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github/mrva-demo-controller-repo", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/github/mrva-demo-controller-repo", + "forks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/forks", + "keys_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/teams", + "hooks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/hooks", + "issue_events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/events{/number}", + "events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/events", + "assignees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/assignees{/user}", + "branches_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/branches{/branch}", + "tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/tags", + "blobs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/languages", + "stargazers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/stargazers", + "contributors_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contributors", + "subscribers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscribers", + "subscription_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscription", + "commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contents/{+path}", + "compare_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/merges", + "archive_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/downloads", + "issues_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues{/number}", + "pulls_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/labels{/name}", + "releases_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/releases{/id}", + "deployments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/deployments" + }, + "actor": { + "login": "charisk", + "id": 311693, + "node_id": "MDQ6VXNlcjMxMTY5Mw==", + "avatar_url": "https://avatars.githubusercontent.com/u/311693?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/charisk", + "html_url": "https://github.com/charisk", + "followers_url": "https://api.github.com/users/charisk/followers", + "following_url": "https://api.github.com/users/charisk/following{/other_user}", + "gists_url": "https://api.github.com/users/charisk/gists{/gist_id}", + "starred_url": "https://api.github.com/users/charisk/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/charisk/subscriptions", + "organizations_url": "https://api.github.com/users/charisk/orgs", + "repos_url": "https://api.github.com/users/charisk/repos", + "events_url": "https://api.github.com/users/charisk/events{/privacy}", + "received_events_url": "https://api.github.com/users/charisk/received_events", + "type": "User", + "site_admin": true + }, + "query_language": "javascript", + "query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124815Z&X-Amz-Expires=3600&X-Amz-Signature=0f42201f27ad08ac1fa9caccf5005d9dac7bdcae33e88e33d62e2fc337194164&X-Amz-SignedHeaders=host", + "created_at": "2022-10-26T12:45:12Z", + "updated_at": "2022-10-26T12:45:15Z", + "actions_workflow_run_id": 3329095282, + "status": "in_progress", + "scanned_repositories": [ + { + "repository": { + "id": 206444, + "name": "hive", + "full_name": "apache/hive", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 81841, + "result_count": 4 + }, + { + "repository": { + "id": 20753500, + "name": "ng-nice", + "full_name": "angular-cn/ng-nice", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 156706, + "result_count": 8 + }, + { + "repository": { + "id": 23418517, + "name": "hadoop", + "full_name": "apache/hadoop", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 66895, + "result_count": 3 + }, + { + "repository": { + "id": 236095576, + "name": "backstage", + "full_name": "backstage/backstage", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 710, + "result_count": 0 + }, + { + "repository": { + "id": 257485422, + "name": "vite", + "full_name": "vitejs/vite", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 702, + "result_count": 0 + } + ], + "skipped_repositories": { + "access_mismatch_repos": { + "repository_count": 0, + "repositories": [] + }, + "no_codeql_db_repos": { + "repository_count": 0, + "repositories": [] + }, + "over_limit_repos": { + "repository_count": 0, + "repositories": [] + } + } + } + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/25-getVariantAnalysisRepo.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/25-getVariantAnalysisRepo.json new file mode 100644 index 00000000000..4218c8111e0 --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/25-getVariantAnalysisRepo.json @@ -0,0 +1,84 @@ +{ + "request": { + "kind": "getVariantAnalysisRepo", + "repositoryId": 236095576 + }, + "response": { + "status": 200, + "body": { + "repository": { + "id": 236095576, + "node_id": "MDEwOlJlcG9zaXRvcnkyMzYwOTU1NzY=", + "name": "backstage", + "full_name": "backstage/backstage", + "private": false, + "owner": { + "login": "backstage", + "id": 72526453, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjcyNTI2NDUz", + "avatar_url": "https://avatars.githubusercontent.com/u/72526453?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/backstage", + "html_url": "https://github.com/backstage", + "followers_url": "https://api.github.com/users/backstage/followers", + "following_url": "https://api.github.com/users/backstage/following{/other_user}", + "gists_url": "https://api.github.com/users/backstage/gists{/gist_id}", + "starred_url": "https://api.github.com/users/backstage/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/backstage/subscriptions", + "organizations_url": "https://api.github.com/users/backstage/orgs", + "repos_url": "https://api.github.com/users/backstage/repos", + "events_url": "https://api.github.com/users/backstage/events{/privacy}", + "received_events_url": "https://api.github.com/users/backstage/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/backstage/backstage", + "description": "Backstage is an open platform for building developer portals", + "fork": false, + "url": "https://api.github.com/repos/backstage/backstage", + "forks_url": "https://api.github.com/repos/backstage/backstage/forks", + "keys_url": "https://api.github.com/repos/backstage/backstage/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/backstage/backstage/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/backstage/backstage/teams", + "hooks_url": "https://api.github.com/repos/backstage/backstage/hooks", + "issue_events_url": "https://api.github.com/repos/backstage/backstage/issues/events{/number}", + "events_url": "https://api.github.com/repos/backstage/backstage/events", + "assignees_url": "https://api.github.com/repos/backstage/backstage/assignees{/user}", + "branches_url": "https://api.github.com/repos/backstage/backstage/branches{/branch}", + "tags_url": "https://api.github.com/repos/backstage/backstage/tags", + "blobs_url": "https://api.github.com/repos/backstage/backstage/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/backstage/backstage/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/backstage/backstage/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/backstage/backstage/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/backstage/backstage/statuses/{sha}", + "languages_url": "https://api.github.com/repos/backstage/backstage/languages", + "stargazers_url": "https://api.github.com/repos/backstage/backstage/stargazers", + "contributors_url": "https://api.github.com/repos/backstage/backstage/contributors", + "subscribers_url": "https://api.github.com/repos/backstage/backstage/subscribers", + "subscription_url": "https://api.github.com/repos/backstage/backstage/subscription", + "commits_url": "https://api.github.com/repos/backstage/backstage/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/backstage/backstage/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/backstage/backstage/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/backstage/backstage/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/backstage/backstage/contents/{+path}", + "compare_url": "https://api.github.com/repos/backstage/backstage/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/backstage/backstage/merges", + "archive_url": "https://api.github.com/repos/backstage/backstage/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/backstage/backstage/downloads", + "issues_url": "https://api.github.com/repos/backstage/backstage/issues{/number}", + "pulls_url": "https://api.github.com/repos/backstage/backstage/pulls{/number}", + "milestones_url": "https://api.github.com/repos/backstage/backstage/milestones{/number}", + "notifications_url": "https://api.github.com/repos/backstage/backstage/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/backstage/backstage/labels{/name}", + "releases_url": "https://api.github.com/repos/backstage/backstage/releases{/id}", + "deployments_url": "https://api.github.com/repos/backstage/backstage/deployments" + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 710, + "result_count": 0, + "database_commit_sha": "18536a76c5efb0f0706c309f3295ed7f11f80491", + "source_location_prefix": "/home/runner/work/backstage/backstage", + "artifact_url": "https://objects-origin.githubusercontent.com/codeql-query-console/codeql-variant-analysis-repo-tasks/146/236095576/b4e1e158-d7ce-45e8-8fac-dad3524f2d54?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124816Z&X-Amz-Expires=300&X-Amz-Signature=c215823eebb9d0ca92045e1c99591dfd28005562815b46d68cbfad25621375ea&X-Amz-SignedHeaders=host&actor_id=311693&key_id=0&repo_id=557804416" + } + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/26-getVariantAnalysisRepoResult.body.zip b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/26-getVariantAnalysisRepoResult.body.zip new file mode 100644 index 00000000000..39377918c6d Binary files /dev/null and b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/26-getVariantAnalysisRepoResult.body.zip differ diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/26-getVariantAnalysisRepoResult.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/26-getVariantAnalysisRepoResult.json new file mode 100644 index 00000000000..eca4942efed --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/26-getVariantAnalysisRepoResult.json @@ -0,0 +1,11 @@ +{ + "request": { + "kind": "getVariantAnalysisRepoResult", + "repositoryId": 236095576 + }, + "response": { + "status": 200, + "body": "file:26-getVariantAnalysisRepoResult.body.zip", + "contentType": "application/zip" + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/27-getVariantAnalysis.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/27-getVariantAnalysis.json new file mode 100644 index 00000000000..3454583b267 --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/27-getVariantAnalysis.json @@ -0,0 +1,176 @@ +{ + "request": { + "kind": "getVariantAnalysis" + }, + "response": { + "status": 200, + "body": { + "id": 146, + "controller_repo": { + "id": 557804416, + "node_id": "R_kgDOIT9rgA", + "name": "mrva-demo-controller-repo", + "full_name": "github/mrva-demo-controller-repo", + "private": true, + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github/mrva-demo-controller-repo", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/github/mrva-demo-controller-repo", + "forks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/forks", + "keys_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/teams", + "hooks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/hooks", + "issue_events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/events{/number}", + "events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/events", + "assignees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/assignees{/user}", + "branches_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/branches{/branch}", + "tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/tags", + "blobs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/languages", + "stargazers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/stargazers", + "contributors_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contributors", + "subscribers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscribers", + "subscription_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscription", + "commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contents/{+path}", + "compare_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/merges", + "archive_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/downloads", + "issues_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues{/number}", + "pulls_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/labels{/name}", + "releases_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/releases{/id}", + "deployments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/deployments" + }, + "actor": { + "login": "charisk", + "id": 311693, + "node_id": "MDQ6VXNlcjMxMTY5Mw==", + "avatar_url": "https://avatars.githubusercontent.com/u/311693?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/charisk", + "html_url": "https://github.com/charisk", + "followers_url": "https://api.github.com/users/charisk/followers", + "following_url": "https://api.github.com/users/charisk/following{/other_user}", + "gists_url": "https://api.github.com/users/charisk/gists{/gist_id}", + "starred_url": "https://api.github.com/users/charisk/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/charisk/subscriptions", + "organizations_url": "https://api.github.com/users/charisk/orgs", + "repos_url": "https://api.github.com/users/charisk/repos", + "events_url": "https://api.github.com/users/charisk/events{/privacy}", + "received_events_url": "https://api.github.com/users/charisk/received_events", + "type": "User", + "site_admin": true + }, + "query_language": "javascript", + "query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124821Z&X-Amz-Expires=3600&X-Amz-Signature=e58c895ffa093606544a7e96b85e10da3b5d4dce741b4f1553dd1c2c6735aca1&X-Amz-SignedHeaders=host", + "created_at": "2022-10-26T12:45:12Z", + "updated_at": "2022-10-26T12:45:15Z", + "actions_workflow_run_id": 3329095282, + "status": "completed", + "completed_at": "2022-10-26T12:48:17Z", + "scanned_repositories": [ + { + "repository": { + "id": 206444, + "name": "hive", + "full_name": "apache/hive", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 81841, + "result_count": 4 + }, + { + "repository": { + "id": 20753500, + "name": "ng-nice", + "full_name": "angular-cn/ng-nice", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 156706, + "result_count": 8 + }, + { + "repository": { + "id": 23418517, + "name": "hadoop", + "full_name": "apache/hadoop", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 66895, + "result_count": 3 + }, + { + "repository": { + "id": 236095576, + "name": "backstage", + "full_name": "backstage/backstage", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 710, + "result_count": 0 + }, + { + "repository": { + "id": 257485422, + "name": "vite", + "full_name": "vitejs/vite", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 702, + "result_count": 0 + } + ], + "skipped_repositories": { + "access_mismatch_repos": { + "repository_count": 0, + "repositories": [] + }, + "no_codeql_db_repos": { + "repository_count": 0, + "repositories": [] + }, + "over_limit_repos": { + "repository_count": 0, + "repositories": [] + } + } + } + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/3-getVariantAnalysis.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/3-getVariantAnalysis.json new file mode 100644 index 00000000000..162f6bfaf61 --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/3-getVariantAnalysis.json @@ -0,0 +1,165 @@ +{ + "request": { + "kind": "getVariantAnalysis" + }, + "response": { + "status": 200, + "body": { + "id": 146, + "controller_repo": { + "id": 557804416, + "node_id": "R_kgDOIT9rgA", + "name": "mrva-demo-controller-repo", + "full_name": "github/mrva-demo-controller-repo", + "private": true, + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github/mrva-demo-controller-repo", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/github/mrva-demo-controller-repo", + "forks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/forks", + "keys_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/teams", + "hooks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/hooks", + "issue_events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/events{/number}", + "events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/events", + "assignees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/assignees{/user}", + "branches_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/branches{/branch}", + "tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/tags", + "blobs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/languages", + "stargazers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/stargazers", + "contributors_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contributors", + "subscribers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscribers", + "subscription_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscription", + "commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contents/{+path}", + "compare_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/merges", + "archive_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/downloads", + "issues_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues{/number}", + "pulls_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/labels{/name}", + "releases_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/releases{/id}", + "deployments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/deployments" + }, + "actor": { + "login": "charisk", + "id": 311693, + "node_id": "MDQ6VXNlcjMxMTY5Mw==", + "avatar_url": "https://avatars.githubusercontent.com/u/311693?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/charisk", + "html_url": "https://github.com/charisk", + "followers_url": "https://api.github.com/users/charisk/followers", + "following_url": "https://api.github.com/users/charisk/following{/other_user}", + "gists_url": "https://api.github.com/users/charisk/gists{/gist_id}", + "starred_url": "https://api.github.com/users/charisk/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/charisk/subscriptions", + "organizations_url": "https://api.github.com/users/charisk/orgs", + "repos_url": "https://api.github.com/users/charisk/repos", + "events_url": "https://api.github.com/users/charisk/events{/privacy}", + "received_events_url": "https://api.github.com/users/charisk/received_events", + "type": "User", + "site_admin": true + }, + "query_language": "javascript", + "query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124541Z&X-Amz-Expires=3600&X-Amz-Signature=460be8321c2d7f129cb3b2ddaefabb4e11b1bf1de207fc4bfaa9fa30b3d4c2ac&X-Amz-SignedHeaders=host", + "created_at": "2022-10-26T12:45:12Z", + "updated_at": "2022-10-26T12:45:15Z", + "actions_workflow_run_id": 3329095282, + "status": "in_progress", + "scanned_repositories": [ + { + "repository": { + "id": 206444, + "name": "hive", + "full_name": "apache/hive", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 20753500, + "name": "ng-nice", + "full_name": "angular-cn/ng-nice", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 23418517, + "name": "hadoop", + "full_name": "apache/hadoop", + "private": false + }, + "analysis_status": "pending" + }, + { + "repository": { + "id": 236095576, + "name": "backstage", + "full_name": "backstage/backstage", + "private": false + }, + "analysis_status": "pending" + }, + { + "repository": { + "id": 257485422, + "name": "vite", + "full_name": "vitejs/vite", + "private": false + }, + "analysis_status": "pending" + } + ], + "skipped_repositories": { + "access_mismatch_repos": { + "repository_count": 0, + "repositories": [] + }, + "no_codeql_db_repos": { + "repository_count": 0, + "repositories": [] + }, + "over_limit_repos": { + "repository_count": 0, + "repositories": [] + } + } + } + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/4-getVariantAnalysis.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/4-getVariantAnalysis.json new file mode 100644 index 00000000000..ec128ae7481 --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/4-getVariantAnalysis.json @@ -0,0 +1,165 @@ +{ + "request": { + "kind": "getVariantAnalysis" + }, + "response": { + "status": 200, + "body": { + "id": 146, + "controller_repo": { + "id": 557804416, + "node_id": "R_kgDOIT9rgA", + "name": "mrva-demo-controller-repo", + "full_name": "github/mrva-demo-controller-repo", + "private": true, + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github/mrva-demo-controller-repo", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/github/mrva-demo-controller-repo", + "forks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/forks", + "keys_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/teams", + "hooks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/hooks", + "issue_events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/events{/number}", + "events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/events", + "assignees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/assignees{/user}", + "branches_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/branches{/branch}", + "tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/tags", + "blobs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/languages", + "stargazers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/stargazers", + "contributors_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contributors", + "subscribers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscribers", + "subscription_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscription", + "commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contents/{+path}", + "compare_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/merges", + "archive_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/downloads", + "issues_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues{/number}", + "pulls_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/labels{/name}", + "releases_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/releases{/id}", + "deployments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/deployments" + }, + "actor": { + "login": "charisk", + "id": 311693, + "node_id": "MDQ6VXNlcjMxMTY5Mw==", + "avatar_url": "https://avatars.githubusercontent.com/u/311693?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/charisk", + "html_url": "https://github.com/charisk", + "followers_url": "https://api.github.com/users/charisk/followers", + "following_url": "https://api.github.com/users/charisk/following{/other_user}", + "gists_url": "https://api.github.com/users/charisk/gists{/gist_id}", + "starred_url": "https://api.github.com/users/charisk/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/charisk/subscriptions", + "organizations_url": "https://api.github.com/users/charisk/orgs", + "repos_url": "https://api.github.com/users/charisk/repos", + "events_url": "https://api.github.com/users/charisk/events{/privacy}", + "received_events_url": "https://api.github.com/users/charisk/received_events", + "type": "User", + "site_admin": true + }, + "query_language": "javascript", + "query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124546Z&X-Amz-Expires=3600&X-Amz-Signature=79291ed9da9d10cb098bdd70f2a9a67b9701a95fdbe9aa261a7342d57454846a&X-Amz-SignedHeaders=host", + "created_at": "2022-10-26T12:45:12Z", + "updated_at": "2022-10-26T12:45:15Z", + "actions_workflow_run_id": 3329095282, + "status": "in_progress", + "scanned_repositories": [ + { + "repository": { + "id": 206444, + "name": "hive", + "full_name": "apache/hive", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 20753500, + "name": "ng-nice", + "full_name": "angular-cn/ng-nice", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 23418517, + "name": "hadoop", + "full_name": "apache/hadoop", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 236095576, + "name": "backstage", + "full_name": "backstage/backstage", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 257485422, + "name": "vite", + "full_name": "vitejs/vite", + "private": false + }, + "analysis_status": "in_progress" + } + ], + "skipped_repositories": { + "access_mismatch_repos": { + "repository_count": 0, + "repositories": [] + }, + "no_codeql_db_repos": { + "repository_count": 0, + "repositories": [] + }, + "over_limit_repos": { + "repository_count": 0, + "repositories": [] + } + } + } + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/5-getVariantAnalysis.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/5-getVariantAnalysis.json new file mode 100644 index 00000000000..626f557951b --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/5-getVariantAnalysis.json @@ -0,0 +1,165 @@ +{ + "request": { + "kind": "getVariantAnalysis" + }, + "response": { + "status": 200, + "body": { + "id": 146, + "controller_repo": { + "id": 557804416, + "node_id": "R_kgDOIT9rgA", + "name": "mrva-demo-controller-repo", + "full_name": "github/mrva-demo-controller-repo", + "private": true, + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github/mrva-demo-controller-repo", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/github/mrva-demo-controller-repo", + "forks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/forks", + "keys_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/teams", + "hooks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/hooks", + "issue_events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/events{/number}", + "events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/events", + "assignees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/assignees{/user}", + "branches_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/branches{/branch}", + "tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/tags", + "blobs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/languages", + "stargazers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/stargazers", + "contributors_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contributors", + "subscribers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscribers", + "subscription_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscription", + "commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contents/{+path}", + "compare_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/merges", + "archive_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/downloads", + "issues_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues{/number}", + "pulls_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/labels{/name}", + "releases_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/releases{/id}", + "deployments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/deployments" + }, + "actor": { + "login": "charisk", + "id": 311693, + "node_id": "MDQ6VXNlcjMxMTY5Mw==", + "avatar_url": "https://avatars.githubusercontent.com/u/311693?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/charisk", + "html_url": "https://github.com/charisk", + "followers_url": "https://api.github.com/users/charisk/followers", + "following_url": "https://api.github.com/users/charisk/following{/other_user}", + "gists_url": "https://api.github.com/users/charisk/gists{/gist_id}", + "starred_url": "https://api.github.com/users/charisk/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/charisk/subscriptions", + "organizations_url": "https://api.github.com/users/charisk/orgs", + "repos_url": "https://api.github.com/users/charisk/repos", + "events_url": "https://api.github.com/users/charisk/events{/privacy}", + "received_events_url": "https://api.github.com/users/charisk/received_events", + "type": "User", + "site_admin": true + }, + "query_language": "javascript", + "query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124552Z&X-Amz-Expires=3600&X-Amz-Signature=e25cb4302b297cbe9e966af21101c218421e6bd5b9a414b83fc795fba8af33ad&X-Amz-SignedHeaders=host", + "created_at": "2022-10-26T12:45:12Z", + "updated_at": "2022-10-26T12:45:15Z", + "actions_workflow_run_id": 3329095282, + "status": "in_progress", + "scanned_repositories": [ + { + "repository": { + "id": 206444, + "name": "hive", + "full_name": "apache/hive", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 20753500, + "name": "ng-nice", + "full_name": "angular-cn/ng-nice", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 23418517, + "name": "hadoop", + "full_name": "apache/hadoop", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 236095576, + "name": "backstage", + "full_name": "backstage/backstage", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 257485422, + "name": "vite", + "full_name": "vitejs/vite", + "private": false + }, + "analysis_status": "in_progress" + } + ], + "skipped_repositories": { + "access_mismatch_repos": { + "repository_count": 0, + "repositories": [] + }, + "no_codeql_db_repos": { + "repository_count": 0, + "repositories": [] + }, + "over_limit_repos": { + "repository_count": 0, + "repositories": [] + } + } + } + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/6-getVariantAnalysis.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/6-getVariantAnalysis.json new file mode 100644 index 00000000000..e6fc103d8a1 --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/6-getVariantAnalysis.json @@ -0,0 +1,165 @@ +{ + "request": { + "kind": "getVariantAnalysis" + }, + "response": { + "status": 200, + "body": { + "id": 146, + "controller_repo": { + "id": 557804416, + "node_id": "R_kgDOIT9rgA", + "name": "mrva-demo-controller-repo", + "full_name": "github/mrva-demo-controller-repo", + "private": true, + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github/mrva-demo-controller-repo", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/github/mrva-demo-controller-repo", + "forks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/forks", + "keys_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/teams", + "hooks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/hooks", + "issue_events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/events{/number}", + "events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/events", + "assignees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/assignees{/user}", + "branches_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/branches{/branch}", + "tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/tags", + "blobs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/languages", + "stargazers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/stargazers", + "contributors_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contributors", + "subscribers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscribers", + "subscription_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscription", + "commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contents/{+path}", + "compare_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/merges", + "archive_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/downloads", + "issues_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues{/number}", + "pulls_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/labels{/name}", + "releases_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/releases{/id}", + "deployments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/deployments" + }, + "actor": { + "login": "charisk", + "id": 311693, + "node_id": "MDQ6VXNlcjMxMTY5Mw==", + "avatar_url": "https://avatars.githubusercontent.com/u/311693?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/charisk", + "html_url": "https://github.com/charisk", + "followers_url": "https://api.github.com/users/charisk/followers", + "following_url": "https://api.github.com/users/charisk/following{/other_user}", + "gists_url": "https://api.github.com/users/charisk/gists{/gist_id}", + "starred_url": "https://api.github.com/users/charisk/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/charisk/subscriptions", + "organizations_url": "https://api.github.com/users/charisk/orgs", + "repos_url": "https://api.github.com/users/charisk/repos", + "events_url": "https://api.github.com/users/charisk/events{/privacy}", + "received_events_url": "https://api.github.com/users/charisk/received_events", + "type": "User", + "site_admin": true + }, + "query_language": "javascript", + "query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124618Z&X-Amz-Expires=3600&X-Amz-Signature=7c109fe6684058982d551c9cc35684bd759d50e49f80f1b61e4614d48bace95a&X-Amz-SignedHeaders=host", + "created_at": "2022-10-26T12:45:12Z", + "updated_at": "2022-10-26T12:45:15Z", + "actions_workflow_run_id": 3329095282, + "status": "in_progress", + "scanned_repositories": [ + { + "repository": { + "id": 206444, + "name": "hive", + "full_name": "apache/hive", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 20753500, + "name": "ng-nice", + "full_name": "angular-cn/ng-nice", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 23418517, + "name": "hadoop", + "full_name": "apache/hadoop", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 236095576, + "name": "backstage", + "full_name": "backstage/backstage", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 257485422, + "name": "vite", + "full_name": "vitejs/vite", + "private": false + }, + "analysis_status": "in_progress" + } + ], + "skipped_repositories": { + "access_mismatch_repos": { + "repository_count": 0, + "repositories": [] + }, + "no_codeql_db_repos": { + "repository_count": 0, + "repositories": [] + }, + "over_limit_repos": { + "repository_count": 0, + "repositories": [] + } + } + } + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/7-getVariantAnalysis.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/7-getVariantAnalysis.json new file mode 100644 index 00000000000..d9010a12006 --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/7-getVariantAnalysis.json @@ -0,0 +1,166 @@ +{ + "request": { + "kind": "getVariantAnalysis" + }, + "response": { + "status": 200, + "body": { + "id": 146, + "controller_repo": { + "id": 557804416, + "node_id": "R_kgDOIT9rgA", + "name": "mrva-demo-controller-repo", + "full_name": "github/mrva-demo-controller-repo", + "private": true, + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github/mrva-demo-controller-repo", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/github/mrva-demo-controller-repo", + "forks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/forks", + "keys_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/teams", + "hooks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/hooks", + "issue_events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/events{/number}", + "events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/events", + "assignees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/assignees{/user}", + "branches_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/branches{/branch}", + "tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/tags", + "blobs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/languages", + "stargazers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/stargazers", + "contributors_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contributors", + "subscribers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscribers", + "subscription_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscription", + "commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contents/{+path}", + "compare_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/merges", + "archive_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/downloads", + "issues_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues{/number}", + "pulls_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/labels{/name}", + "releases_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/releases{/id}", + "deployments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/deployments" + }, + "actor": { + "login": "charisk", + "id": 311693, + "node_id": "MDQ6VXNlcjMxMTY5Mw==", + "avatar_url": "https://avatars.githubusercontent.com/u/311693?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/charisk", + "html_url": "https://github.com/charisk", + "followers_url": "https://api.github.com/users/charisk/followers", + "following_url": "https://api.github.com/users/charisk/following{/other_user}", + "gists_url": "https://api.github.com/users/charisk/gists{/gist_id}", + "starred_url": "https://api.github.com/users/charisk/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/charisk/subscriptions", + "organizations_url": "https://api.github.com/users/charisk/orgs", + "repos_url": "https://api.github.com/users/charisk/repos", + "events_url": "https://api.github.com/users/charisk/events{/privacy}", + "received_events_url": "https://api.github.com/users/charisk/received_events", + "type": "User", + "site_admin": true + }, + "query_language": "javascript", + "query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124641Z&X-Amz-Expires=3600&X-Amz-Signature=2cd9d02905646befe58ab320d457c89fcccf57a72d70709238edb7caf6737fa4&X-Amz-SignedHeaders=host", + "created_at": "2022-10-26T12:45:12Z", + "updated_at": "2022-10-26T12:45:15Z", + "actions_workflow_run_id": 3329095282, + "status": "in_progress", + "scanned_repositories": [ + { + "repository": { + "id": 206444, + "name": "hive", + "full_name": "apache/hive", + "private": false + }, + "analysis_status": "in_progress", + "artifact_size_in_bytes": 81841 + }, + { + "repository": { + "id": 20753500, + "name": "ng-nice", + "full_name": "angular-cn/ng-nice", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 23418517, + "name": "hadoop", + "full_name": "apache/hadoop", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 236095576, + "name": "backstage", + "full_name": "backstage/backstage", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 257485422, + "name": "vite", + "full_name": "vitejs/vite", + "private": false + }, + "analysis_status": "in_progress" + } + ], + "skipped_repositories": { + "access_mismatch_repos": { + "repository_count": 0, + "repositories": [] + }, + "no_codeql_db_repos": { + "repository_count": 0, + "repositories": [] + }, + "over_limit_repos": { + "repository_count": 0, + "repositories": [] + } + } + } + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/8-getVariantAnalysis.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/8-getVariantAnalysis.json new file mode 100644 index 00000000000..92824660d9c --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/8-getVariantAnalysis.json @@ -0,0 +1,167 @@ +{ + "request": { + "kind": "getVariantAnalysis" + }, + "response": { + "status": 200, + "body": { + "id": 146, + "controller_repo": { + "id": 557804416, + "node_id": "R_kgDOIT9rgA", + "name": "mrva-demo-controller-repo", + "full_name": "github/mrva-demo-controller-repo", + "private": true, + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github/mrva-demo-controller-repo", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/github/mrva-demo-controller-repo", + "forks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/forks", + "keys_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/teams", + "hooks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/hooks", + "issue_events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/events{/number}", + "events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/events", + "assignees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/assignees{/user}", + "branches_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/branches{/branch}", + "tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/tags", + "blobs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/languages", + "stargazers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/stargazers", + "contributors_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contributors", + "subscribers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscribers", + "subscription_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscription", + "commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contents/{+path}", + "compare_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/merges", + "archive_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/downloads", + "issues_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues{/number}", + "pulls_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/labels{/name}", + "releases_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/releases{/id}", + "deployments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/deployments" + }, + "actor": { + "login": "charisk", + "id": 311693, + "node_id": "MDQ6VXNlcjMxMTY5Mw==", + "avatar_url": "https://avatars.githubusercontent.com/u/311693?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/charisk", + "html_url": "https://github.com/charisk", + "followers_url": "https://api.github.com/users/charisk/followers", + "following_url": "https://api.github.com/users/charisk/following{/other_user}", + "gists_url": "https://api.github.com/users/charisk/gists{/gist_id}", + "starred_url": "https://api.github.com/users/charisk/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/charisk/subscriptions", + "organizations_url": "https://api.github.com/users/charisk/orgs", + "repos_url": "https://api.github.com/users/charisk/repos", + "events_url": "https://api.github.com/users/charisk/events{/privacy}", + "received_events_url": "https://api.github.com/users/charisk/received_events", + "type": "User", + "site_admin": true + }, + "query_language": "javascript", + "query_pack_url": "https://objects-origin.githubusercontent.com/codeql-query-console/variant_analyses/146/query_pack?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124647Z&X-Amz-Expires=3600&X-Amz-Signature=c381f6655d995c39506813e30604a1963c77c3b0fb978d1a13143faa1e66a60b&X-Amz-SignedHeaders=host", + "created_at": "2022-10-26T12:45:12Z", + "updated_at": "2022-10-26T12:45:15Z", + "actions_workflow_run_id": 3329095282, + "status": "in_progress", + "scanned_repositories": [ + { + "repository": { + "id": 206444, + "name": "hive", + "full_name": "apache/hive", + "private": false + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 81841, + "result_count": 4 + }, + { + "repository": { + "id": 20753500, + "name": "ng-nice", + "full_name": "angular-cn/ng-nice", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 23418517, + "name": "hadoop", + "full_name": "apache/hadoop", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 236095576, + "name": "backstage", + "full_name": "backstage/backstage", + "private": false + }, + "analysis_status": "in_progress" + }, + { + "repository": { + "id": 257485422, + "name": "vite", + "full_name": "vitejs/vite", + "private": false + }, + "analysis_status": "in_progress" + } + ], + "skipped_repositories": { + "access_mismatch_repos": { + "repository_count": 0, + "repositories": [] + }, + "no_codeql_db_repos": { + "repository_count": 0, + "repositories": [] + }, + "over_limit_repos": { + "repository_count": 0, + "repositories": [] + } + } + } + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/9-getVariantAnalysisRepo.json b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/9-getVariantAnalysisRepo.json new file mode 100644 index 00000000000..221bc729c56 --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/problem-query-success/9-getVariantAnalysisRepo.json @@ -0,0 +1,84 @@ +{ + "request": { + "kind": "getVariantAnalysisRepo", + "repositoryId": 206444 + }, + "response": { + "status": 200, + "body": { + "repository": { + "id": 206444, + "node_id": "MDEwOlJlcG9zaXRvcnkyMDY0NDQ=", + "name": "hive", + "full_name": "apache/hive", + "private": false, + "owner": { + "login": "apache", + "id": 47359, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjQ3MzU5", + "avatar_url": "https://avatars.githubusercontent.com/u/47359?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/apache", + "html_url": "https://github.com/apache", + "followers_url": "https://api.github.com/users/apache/followers", + "following_url": "https://api.github.com/users/apache/following{/other_user}", + "gists_url": "https://api.github.com/users/apache/gists{/gist_id}", + "starred_url": "https://api.github.com/users/apache/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/apache/subscriptions", + "organizations_url": "https://api.github.com/users/apache/orgs", + "repos_url": "https://api.github.com/users/apache/repos", + "events_url": "https://api.github.com/users/apache/events{/privacy}", + "received_events_url": "https://api.github.com/users/apache/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/apache/hive", + "description": "Apache Hive", + "fork": false, + "url": "https://api.github.com/repos/apache/hive", + "forks_url": "https://api.github.com/repos/apache/hive/forks", + "keys_url": "https://api.github.com/repos/apache/hive/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/apache/hive/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/apache/hive/teams", + "hooks_url": "https://api.github.com/repos/apache/hive/hooks", + "issue_events_url": "https://api.github.com/repos/apache/hive/issues/events{/number}", + "events_url": "https://api.github.com/repos/apache/hive/events", + "assignees_url": "https://api.github.com/repos/apache/hive/assignees{/user}", + "branches_url": "https://api.github.com/repos/apache/hive/branches{/branch}", + "tags_url": "https://api.github.com/repos/apache/hive/tags", + "blobs_url": "https://api.github.com/repos/apache/hive/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/apache/hive/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/apache/hive/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/apache/hive/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/apache/hive/statuses/{sha}", + "languages_url": "https://api.github.com/repos/apache/hive/languages", + "stargazers_url": "https://api.github.com/repos/apache/hive/stargazers", + "contributors_url": "https://api.github.com/repos/apache/hive/contributors", + "subscribers_url": "https://api.github.com/repos/apache/hive/subscribers", + "subscription_url": "https://api.github.com/repos/apache/hive/subscription", + "commits_url": "https://api.github.com/repos/apache/hive/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/apache/hive/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/apache/hive/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/apache/hive/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/apache/hive/contents/{+path}", + "compare_url": "https://api.github.com/repos/apache/hive/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/apache/hive/merges", + "archive_url": "https://api.github.com/repos/apache/hive/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/apache/hive/downloads", + "issues_url": "https://api.github.com/repos/apache/hive/issues{/number}", + "pulls_url": "https://api.github.com/repos/apache/hive/pulls{/number}", + "milestones_url": "https://api.github.com/repos/apache/hive/milestones{/number}", + "notifications_url": "https://api.github.com/repos/apache/hive/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/apache/hive/labels{/name}", + "releases_url": "https://api.github.com/repos/apache/hive/releases{/id}", + "deployments_url": "https://api.github.com/repos/apache/hive/deployments" + }, + "analysis_status": "succeeded", + "artifact_size_in_bytes": 81841, + "result_count": 4, + "database_commit_sha": "6b05d64ce8c7161415d97a7896ea50025322e30a", + "source_location_prefix": "/home/runner/work/bulk-builder/bulk-builder", + "artifact_url": "https://objects-origin.githubusercontent.com/codeql-query-console/codeql-variant-analysis-repo-tasks/146/206444/c7de30bb-37f9-4d44-b738-c29eb805d2f0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=queryconsoleprod%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T124648Z&X-Amz-Expires=300&X-Amz-Signature=79338df6b62460d60a85e365eb10a4da2301a0ec2bd3fbeb08546c700c906021&X-Amz-SignedHeaders=host&actor_id=311693&key_id=0&repo_id=557804416" + } + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/submission-failure/0-getRepo.json b/extensions/ql-vscode/src/mocks/scenarios/submission-failure/0-getRepo.json new file mode 100644 index 00000000000..a1fa60a031e --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/submission-failure/0-getRepo.json @@ -0,0 +1,159 @@ +{ + "request": { + "kind": "getRepo" + }, + "response": { + "status": 200, + "body": { + "id": 557804416, + "node_id": "R_kgDOIT9rgA", + "name": "mrva-demo-controller-repo", + "full_name": "github/mrva-demo-controller-repo", + "private": true, + "owner": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/github/mrva-demo-controller-repo", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/github/mrva-demo-controller-repo", + "forks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/forks", + "keys_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/teams", + "hooks_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/hooks", + "issue_events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/events{/number}", + "events_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/events", + "assignees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/assignees{/user}", + "branches_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/branches{/branch}", + "tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/tags", + "blobs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/languages", + "stargazers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/stargazers", + "contributors_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contributors", + "subscribers_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscribers", + "subscription_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/subscription", + "commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/contents/{+path}", + "compare_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/merges", + "archive_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/downloads", + "issues_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/issues{/number}", + "pulls_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/labels{/name}", + "releases_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/releases{/id}", + "deployments_url": "https://api.github.com/repos/github/mrva-demo-controller-repo/deployments", + "created_at": "2022-10-26T10:37:59Z", + "updated_at": "2022-10-26T10:37:59Z", + "pushed_at": "2022-10-26T10:38:02Z", + "git_url": "git://github.com/github/mrva-demo-controller-repo.git", + "ssh_url": "git@github.com:github/mrva-demo-controller-repo.git", + "clone_url": "https://github.com/github/mrva-demo-controller-repo.git", + "svn_url": "https://github.com/github/mrva-demo-controller-repo", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": false, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "private", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "permissions": { + "admin": true, + "maintain": true, + "push": true, + "triage": true, + "pull": true + }, + "temp_clone_token": "AACMDDJSXFX6QQXTSB4YQCDDLEWP4", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "organization": { + "login": "github", + "id": 9919, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", + "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github", + "html_url": "https://github.com/github", + "followers_url": "https://api.github.com/users/github/followers", + "following_url": "https://api.github.com/users/github/following{/other_user}", + "gists_url": "https://api.github.com/users/github/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github/subscriptions", + "organizations_url": "https://api.github.com/users/github/orgs", + "repos_url": "https://api.github.com/users/github/repos", + "events_url": "https://api.github.com/users/github/events{/privacy}", + "received_events_url": "https://api.github.com/users/github/received_events", + "type": "Organization", + "site_admin": false + }, + "security_and_analysis": { + "advanced_security": { + "status": "enabled" + }, + "secret_scanning": { + "status": "enabled" + }, + "secret_scanning_push_protection": { + "status": "enabled" + } + }, + "network_count": 0, + "subscribers_count": 0 + } + } +} diff --git a/extensions/ql-vscode/src/mocks/scenarios/submission-failure/1-submitVariantAnalysis.json b/extensions/ql-vscode/src/mocks/scenarios/submission-failure/1-submitVariantAnalysis.json new file mode 100644 index 00000000000..df22631699e --- /dev/null +++ b/extensions/ql-vscode/src/mocks/scenarios/submission-failure/1-submitVariantAnalysis.json @@ -0,0 +1,11 @@ +{ + "request": { + "kind": "submitVariantAnalysis" + }, + "response": { + "status": 422, + "body": { + "message": "No repositories could be queried." + } + } +}