diff --git a/frontend/packages/dev-console/integration-tests/support/pages/add-flow/git-page.ts b/frontend/packages/dev-console/integration-tests/support/pages/add-flow/git-page.ts index a41e4026a60a..823f66ca8ba9 100644 --- a/frontend/packages/dev-console/integration-tests/support/pages/add-flow/git-page.ts +++ b/frontend/packages/dev-console/integration-tests/support/pages/add-flow/git-page.ts @@ -45,6 +45,11 @@ export const gitPage = { statusCode: responses.devFileResources ? 200 : 404, body: responses.devFileResources, }).as('getDevfileResources'); + + cy.intercept('GET', `${apiBaseUrl}/contents//func.yaml`, { + statusCode: responses.funcJson ? 200 : 404, + body: responses.funcJson, + }).as('getFuncJson'); } cy.get(gitPO.gitRepoUrl).clear().type(gitUrl); diff --git a/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-node-env/contents.json b/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-node-env/contents.json new file mode 100644 index 000000000000..02470b5c031c --- /dev/null +++ b/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-node-env/contents.json @@ -0,0 +1,114 @@ +[ + { + "name": ".gitignore", + "path": ".gitignore", + "sha": "3abd5fdff11e295a0d72346ac99fe7034da1c6cb", + "size": 126, + "url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/contents/.gitignore?ref=master", + "html_url": "https://github.com/vikram-raj/hello-func-node-env/blob/master/.gitignore", + "git_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/git/blobs/3abd5fdff11e295a0d72346ac99fe7034da1c6cb", + "download_url": "https://raw.githubusercontent.com/vikram-raj/hello-func-node-env/master/.gitignore", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/vikram-raj/hello-func-node-env/contents/.gitignore?ref=master", + "git": "https://api.github.com/repos/vikram-raj/hello-func-node-env/git/blobs/3abd5fdff11e295a0d72346ac99fe7034da1c6cb", + "html": "https://github.com/vikram-raj/hello-func-node-env/blob/master/.gitignore" + } + }, + { + "name": "README.md", + "path": "README.md", + "sha": "3ecedd17b45af0a59d4a52dd648eda8ba090047a", + "size": 2096, + "url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/contents/README.md?ref=master", + "html_url": "https://github.com/vikram-raj/hello-func-node-env/blob/master/README.md", + "git_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/git/blobs/3ecedd17b45af0a59d4a52dd648eda8ba090047a", + "download_url": "https://raw.githubusercontent.com/vikram-raj/hello-func-node-env/master/README.md", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/vikram-raj/hello-func-node-env/contents/README.md?ref=master", + "git": "https://api.github.com/repos/vikram-raj/hello-func-node-env/git/blobs/3ecedd17b45af0a59d4a52dd648eda8ba090047a", + "html": "https://github.com/vikram-raj/hello-func-node-env/blob/master/README.md" + } + }, + { + "name": "func.yaml", + "path": "func.yaml", + "sha": "0ee31c9ad466045e40efa70433806dd40f1ca3c7", + "size": 721, + "url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/contents/func.yaml?ref=master", + "html_url": "https://github.com/vikram-raj/hello-func-node-env/blob/master/func.yaml", + "git_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/git/blobs/0ee31c9ad466045e40efa70433806dd40f1ca3c7", + "download_url": "https://raw.githubusercontent.com/vikram-raj/hello-func-node-env/master/func.yaml", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/vikram-raj/hello-func-node-env/contents/func.yaml?ref=master", + "git": "https://api.github.com/repos/vikram-raj/hello-func-node-env/git/blobs/0ee31c9ad466045e40efa70433806dd40f1ca3c7", + "html": "https://github.com/vikram-raj/hello-func-node-env/blob/master/func.yaml" + } + }, + { + "name": "index.js", + "path": "index.js", + "sha": "04c81441d0b3e3e39bee13343c4058956f4ee0e4", + "size": 1463, + "url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/contents/index.js?ref=master", + "html_url": "https://github.com/vikram-raj/hello-func-node-env/blob/master/index.js", + "git_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/git/blobs/04c81441d0b3e3e39bee13343c4058956f4ee0e4", + "download_url": "https://raw.githubusercontent.com/vikram-raj/hello-func-node-env/master/index.js", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/vikram-raj/hello-func-node-env/contents/index.js?ref=master", + "git": "https://api.github.com/repos/vikram-raj/hello-func-node-env/git/blobs/04c81441d0b3e3e39bee13343c4058956f4ee0e4", + "html": "https://github.com/vikram-raj/hello-func-node-env/blob/master/index.js" + } + }, + { + "name": "package-lock.json", + "path": "package-lock.json", + "sha": "14391b4480f8919aa6cedfe7e92585eb55259d8a", + "size": 151831, + "url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/contents/package-lock.json?ref=master", + "html_url": "https://github.com/vikram-raj/hello-func-node-env/blob/master/package-lock.json", + "git_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/git/blobs/14391b4480f8919aa6cedfe7e92585eb55259d8a", + "download_url": "https://raw.githubusercontent.com/vikram-raj/hello-func-node-env/master/package-lock.json", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/vikram-raj/hello-func-node-env/contents/package-lock.json?ref=master", + "git": "https://api.github.com/repos/vikram-raj/hello-func-node-env/git/blobs/14391b4480f8919aa6cedfe7e92585eb55259d8a", + "html": "https://github.com/vikram-raj/hello-func-node-env/blob/master/package-lock.json" + } + }, + { + "name": "package.json", + "path": "package.json", + "sha": "2806b7a4ce0a7caf6f1e3d9c0a833c81db97f7eb", + "size": 565, + "url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/contents/package.json?ref=master", + "html_url": "https://github.com/vikram-raj/hello-func-node-env/blob/master/package.json", + "git_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/git/blobs/2806b7a4ce0a7caf6f1e3d9c0a833c81db97f7eb", + "download_url": "https://raw.githubusercontent.com/vikram-raj/hello-func-node-env/master/package.json", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/vikram-raj/hello-func-node-env/contents/package.json?ref=master", + "git": "https://api.github.com/repos/vikram-raj/hello-func-node-env/git/blobs/2806b7a4ce0a7caf6f1e3d9c0a833c81db97f7eb", + "html": "https://github.com/vikram-raj/hello-func-node-env/blob/master/package.json" + } + }, + { + "name": "test", + "path": "test", + "sha": "9cea2aab5cb7d30f925060499367172b566d0842", + "size": 0, + "url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/contents/test?ref=master", + "html_url": "https://github.com/vikram-raj/hello-func-node-env/tree/master/test", + "git_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/git/trees/9cea2aab5cb7d30f925060499367172b566d0842", + "download_url": null, + "type": "dir", + "_links": { + "self": "https://api.github.com/repos/vikram-raj/hello-func-node-env/contents/test?ref=master", + "git": "https://api.github.com/repos/vikram-raj/hello-func-node-env/git/trees/9cea2aab5cb7d30f925060499367172b566d0842", + "html": "https://github.com/vikram-raj/hello-func-node-env/tree/master/test" + } + } + ] diff --git a/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-node-env/func.json b/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-node-env/func.json new file mode 100644 index 000000000000..f0d1e760d81e --- /dev/null +++ b/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-node-env/func.json @@ -0,0 +1,18 @@ +{ + "name": "func.yaml", + "path": "func.yaml", + "sha": "0ee31c9ad466045e40efa70433806dd40f1ca3c7", + "size": 721, + "url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/contents/func.yaml?ref=master", + "html_url": "https://github.com/vikram-raj/hello-func-node-env/blob/master/func.yaml", + "git_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/git/blobs/0ee31c9ad466045e40efa70433806dd40f1ca3c7", + "download_url": "https://raw.githubusercontent.com/vikram-raj/hello-func-node-env/master/func.yaml", + "type": "file", + "content": "c3BlY1ZlcnNpb246IDAuMzQuMApuYW1lOiBoZWxsby1mdW5jLW5vZGUtZW52\nCnJ1bnRpbWU6IG5vZGUKcmVnaXN0cnk6IHF1YXkuaW8vdmlyYWpfMQppbWFn\nZTogaW1hZ2UtcmVnaXN0cnkub3BlbnNoaWZ0LWltYWdlLXJlZ2lzdHJ5LnN2\nYzo1MDAwL2RlZmF1bHQvaGVsbG8tZnVuYy1ub2RlLWVudjpsYXRlc3QKaW1h\nZ2VEaWdlc3Q6IHNoYTI1NjoyZjNmMzY2ODM3NDllZDM0YWNiNzVjNjYxMjhl\nYmM3MmVjNmYxZWVlN2RjMTUwNjAyOTMxMTEyMzkzZWI3OGE5CmNyZWF0ZWQ6\nIDIwMjItMTItMjdUMDc6NTQ6NDguMzU2NTY5MjY1KzA1OjMwCmludm9jYXRp\nb246CiAgZm9ybWF0OiBodHRwCmJ1aWxkOgogIGJ1aWxkcGFja3M6IFtdCiAg\nYnVpbGRlcjogczJpCiAgYnVpbGRFbnZzOgogIC0gbmFtZTogYnVpbGRFbnYK\nICAgIHZhbHVlOiBidWlsZEVudlZhbAogIC0gbmFtZTogYnVpbGRFbnYxCiAg\nICB2YWx1ZTogYnVpbGRFbnZWYWwxCnJ1bjoKICB2b2x1bWVzOiBbXQogIGVu\ndnM6CiAgLSBuYW1lOiBoZWxsbwogICAgdmFsdWU6IHdvcmxkCiAgLSBuYW1l\nOiBlbnYKICAgIHZhbHVlOiBlbnZWYWx1ZQpkZXBsb3k6CiAgbmFtZXNwYWNl\nOiB2aXJhagogIGFubm90YXRpb25zOiB7fQogIG9wdGlvbnM6IHt9CiAgbGFi\nZWxzOiBbXQogIGhlYWx0aEVuZHBvaW50czoKICAgIGxpdmVuZXNzOiAvaGVh\nbHRoL2xpdmVuZXNzCiAgICByZWFkaW5lc3M6IC9oZWFsdGgvcmVhZGluZXNz\nCg==\n", + "encoding": "base64", + "_links": { + "self": "https://api.github.com/repos/vikram-raj/hello-func-node-env/contents/func.yaml?ref=master", + "git": "https://api.github.com/repos/vikram-raj/hello-func-node-env/git/blobs/0ee31c9ad466045e40efa70433806dd40f1ca3c7", + "html": "https://github.com/vikram-raj/hello-func-node-env/blob/master/func.yaml" + } +} \ No newline at end of file diff --git a/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-node-env/package.json b/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-node-env/package.json new file mode 100644 index 000000000000..9b34d155c957 --- /dev/null +++ b/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-node-env/package.json @@ -0,0 +1,18 @@ +{ + "name": "package.json", + "path": "package.json", + "sha": "2806b7a4ce0a7caf6f1e3d9c0a833c81db97f7eb", + "size": 565, + "url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/contents/package.json?ref=master", + "html_url": "https://github.com/vikram-raj/hello-func-node-env/blob/master/package.json", + "git_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/git/blobs/2806b7a4ce0a7caf6f1e3d9c0a833c81db97f7eb", + "download_url": "https://raw.githubusercontent.com/vikram-raj/hello-func-node-env/master/package.json", + "type": "file", + "content": "ewogICJuYW1lIjogImh0dHAtaGFuZGxlciIsCiAgInZlcnNpb24iOiAiMC4x\nLjAiLAogICJkZXNjcmlwdGlvbiI6ICJBIGZ1bmN0aW9uIHdoaWNoIHJlc3Bv\nbmRzIHRvIEhUVFAgcmVxdWVzdHMiLAogICJtYWluIjogImluZGV4LmpzIiwK\nICAic2NyaXB0cyI6IHsKICAgICJ0ZXN0IjogIm5vZGUgdGVzdC91bml0Lmpz\nICYmIG5vZGUgdGVzdC9pbnRlZ3JhdGlvbi5qcyIsCiAgICAic3RhcnQiOiAi\nZmFhcy1qcy1ydW50aW1lIC4vaW5kZXguanMiLAogICAgImRlYnVnIjogIm5v\nZGVtb24gLS1pbnNwZWN0IC4vbm9kZV9tb2R1bGVzL2ZhYXMtanMtcnVudGlt\nZS9iaW4vY2xpLmpzIC4vaW5kZXguanMiCiAgfSwKICAia2V5d29yZHMiOiBb\nXSwKICAiYXV0aG9yIjogIiIsCiAgImxpY2Vuc2UiOiAiQXBhY2hlLTIuMCIs\nCiAgImRlcGVuZGVuY2llcyI6IHsKICAgICJmYWFzLWpzLXJ1bnRpbWUiOiAi\nXjAuOS4wIgogIH0sCiAgImRldkRlcGVuZGVuY2llcyI6IHsKICAgICJub2Rl\nbW9uIjogIl4yLjAuNCIsCiAgICAic3VwZXJ0ZXN0IjogIl40LjAuMiIsCiAg\nICAidGFwZSI6ICJeNS4wLjEiCiAgfQp9Cg==\n", + "encoding": "base64", + "_links": { + "self": "https://api.github.com/repos/vikram-raj/hello-func-node-env/contents/package.json?ref=master", + "git": "https://api.github.com/repos/vikram-raj/hello-func-node-env/git/blobs/2806b7a4ce0a7caf6f1e3d9c0a833c81db97f7eb", + "html": "https://github.com/vikram-raj/hello-func-node-env/blob/master/package.json" + } +} diff --git a/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-node-env/repo.json b/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-node-env/repo.json new file mode 100644 index 000000000000..7e1b3ef25b2e --- /dev/null +++ b/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-node-env/repo.json @@ -0,0 +1,105 @@ +{ + "id": 582727984, + "node_id": "R_kgDOIru5MA", + "name": "hello-func-node-env", + "full_name": "vikram-raj/hello-func-node-env", + "private": false, + "owner": { + "login": "vikram-raj", + "id": 2561818, + "node_id": "MDQ6VXNlcjI1NjE4MTg=", + "avatar_url": "https://avatars.githubusercontent.com/u/2561818?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/vikram-raj", + "html_url": "https://github.com/vikram-raj", + "followers_url": "https://api.github.com/users/vikram-raj/followers", + "following_url": "https://api.github.com/users/vikram-raj/following{/other_user}", + "gists_url": "https://api.github.com/users/vikram-raj/gists{/gist_id}", + "starred_url": "https://api.github.com/users/vikram-raj/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/vikram-raj/subscriptions", + "organizations_url": "https://api.github.com/users/vikram-raj/orgs", + "repos_url": "https://api.github.com/users/vikram-raj/repos", + "events_url": "https://api.github.com/users/vikram-raj/events{/privacy}", + "received_events_url": "https://api.github.com/users/vikram-raj/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/vikram-raj/hello-func-node-env", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/vikram-raj/hello-func-node-env", + "forks_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/forks", + "keys_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/teams", + "hooks_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/hooks", + "issue_events_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/issues/events{/number}", + "events_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/events", + "assignees_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/assignees{/user}", + "branches_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/branches{/branch}", + "tags_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/tags", + "blobs_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/statuses/{sha}", + "languages_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/languages", + "stargazers_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/stargazers", + "contributors_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/contributors", + "subscribers_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/subscribers", + "subscription_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/subscription", + "commits_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/contents/{+path}", + "compare_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/merges", + "archive_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/downloads", + "issues_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/issues{/number}", + "pulls_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/pulls{/number}", + "milestones_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/milestones{/number}", + "notifications_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/labels{/name}", + "releases_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/releases{/id}", + "deployments_url": "https://api.github.com/repos/vikram-raj/hello-func-node-env/deployments", + "created_at": "2022-12-27T17:45:59Z", + "updated_at": "2022-12-27T17:47:32Z", + "pushed_at": "2022-12-27T17:47:28Z", + "git_url": "git://github.com/vikram-raj/hello-func-node-env.git", + "ssh_url": "git@github.com:vikram-raj/hello-func-node-env.git", + "clone_url": "https://github.com/vikram-raj/hello-func-node-env.git", + "svn_url": "https://github.com/vikram-raj/hello-func-node-env", + "homepage": null, + "size": 45, + "stargazers_count": 0, + "watchers_count": 0, + "language": "JavaScript", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [ + + ], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "master", + "temp_clone_token": null, + "network_count": 0, + "subscribers_count": 1 + } diff --git a/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-node/contents.json b/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-node/contents.json new file mode 100644 index 000000000000..50d4a3e06663 --- /dev/null +++ b/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-node/contents.json @@ -0,0 +1,114 @@ +[ + { + "name": ".gitignore", + "path": ".gitignore", + "sha": "3abd5fdff11e295a0d72346ac99fe7034da1c6cb", + "size": 126, + "url": "https://api.github.com/repos/vikram-raj/hello-func-node/contents/.gitignore?ref=master", + "html_url": "https://github.com/vikram-raj/hello-func-node/blob/master/.gitignore", + "git_url": "https://api.github.com/repos/vikram-raj/hello-func-node/git/blobs/3abd5fdff11e295a0d72346ac99fe7034da1c6cb", + "download_url": "https://raw.githubusercontent.com/vikram-raj/hello-func-node/master/.gitignore", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/vikram-raj/hello-func-node/contents/.gitignore?ref=master", + "git": "https://api.github.com/repos/vikram-raj/hello-func-node/git/blobs/3abd5fdff11e295a0d72346ac99fe7034da1c6cb", + "html": "https://github.com/vikram-raj/hello-func-node/blob/master/.gitignore" + } + }, + { + "name": "README.md", + "path": "README.md", + "sha": "3ecedd17b45af0a59d4a52dd648eda8ba090047a", + "size": 2096, + "url": "https://api.github.com/repos/vikram-raj/hello-func-node/contents/README.md?ref=master", + "html_url": "https://github.com/vikram-raj/hello-func-node/blob/master/README.md", + "git_url": "https://api.github.com/repos/vikram-raj/hello-func-node/git/blobs/3ecedd17b45af0a59d4a52dd648eda8ba090047a", + "download_url": "https://raw.githubusercontent.com/vikram-raj/hello-func-node/master/README.md", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/vikram-raj/hello-func-node/contents/README.md?ref=master", + "git": "https://api.github.com/repos/vikram-raj/hello-func-node/git/blobs/3ecedd17b45af0a59d4a52dd648eda8ba090047a", + "html": "https://github.com/vikram-raj/hello-func-node/blob/master/README.md" + } + }, + { + "name": "func.yaml", + "path": "func.yaml", + "sha": "296531d91cee272407f90494bca2a20736b4ff30", + "size": 364, + "url": "https://api.github.com/repos/vikram-raj/hello-func-node/contents/func.yaml?ref=master", + "html_url": "https://github.com/vikram-raj/hello-func-node/blob/master/func.yaml", + "git_url": "https://api.github.com/repos/vikram-raj/hello-func-node/git/blobs/296531d91cee272407f90494bca2a20736b4ff30", + "download_url": "https://raw.githubusercontent.com/vikram-raj/hello-func-node/master/func.yaml", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/vikram-raj/hello-func-node/contents/func.yaml?ref=master", + "git": "https://api.github.com/repos/vikram-raj/hello-func-node/git/blobs/296531d91cee272407f90494bca2a20736b4ff30", + "html": "https://github.com/vikram-raj/hello-func-node/blob/master/func.yaml" + } + }, + { + "name": "index.js", + "path": "index.js", + "sha": "04c81441d0b3e3e39bee13343c4058956f4ee0e4", + "size": 1463, + "url": "https://api.github.com/repos/vikram-raj/hello-func-node/contents/index.js?ref=master", + "html_url": "https://github.com/vikram-raj/hello-func-node/blob/master/index.js", + "git_url": "https://api.github.com/repos/vikram-raj/hello-func-node/git/blobs/04c81441d0b3e3e39bee13343c4058956f4ee0e4", + "download_url": "https://raw.githubusercontent.com/vikram-raj/hello-func-node/master/index.js", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/vikram-raj/hello-func-node/contents/index.js?ref=master", + "git": "https://api.github.com/repos/vikram-raj/hello-func-node/git/blobs/04c81441d0b3e3e39bee13343c4058956f4ee0e4", + "html": "https://github.com/vikram-raj/hello-func-node/blob/master/index.js" + } + }, + { + "name": "package-lock.json", + "path": "package-lock.json", + "sha": "14391b4480f8919aa6cedfe7e92585eb55259d8a", + "size": 151831, + "url": "https://api.github.com/repos/vikram-raj/hello-func-node/contents/package-lock.json?ref=master", + "html_url": "https://github.com/vikram-raj/hello-func-node/blob/master/package-lock.json", + "git_url": "https://api.github.com/repos/vikram-raj/hello-func-node/git/blobs/14391b4480f8919aa6cedfe7e92585eb55259d8a", + "download_url": "https://raw.githubusercontent.com/vikram-raj/hello-func-node/master/package-lock.json", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/vikram-raj/hello-func-node/contents/package-lock.json?ref=master", + "git": "https://api.github.com/repos/vikram-raj/hello-func-node/git/blobs/14391b4480f8919aa6cedfe7e92585eb55259d8a", + "html": "https://github.com/vikram-raj/hello-func-node/blob/master/package-lock.json" + } + }, + { + "name": "package.json", + "path": "package.json", + "sha": "2806b7a4ce0a7caf6f1e3d9c0a833c81db97f7eb", + "size": 565, + "url": "https://api.github.com/repos/vikram-raj/hello-func-node/contents/package.json?ref=master", + "html_url": "https://github.com/vikram-raj/hello-func-node/blob/master/package.json", + "git_url": "https://api.github.com/repos/vikram-raj/hello-func-node/git/blobs/2806b7a4ce0a7caf6f1e3d9c0a833c81db97f7eb", + "download_url": "https://raw.githubusercontent.com/vikram-raj/hello-func-node/master/package.json", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/vikram-raj/hello-func-node/contents/package.json?ref=master", + "git": "https://api.github.com/repos/vikram-raj/hello-func-node/git/blobs/2806b7a4ce0a7caf6f1e3d9c0a833c81db97f7eb", + "html": "https://github.com/vikram-raj/hello-func-node/blob/master/package.json" + } + }, + { + "name": "test", + "path": "test", + "sha": "9cea2aab5cb7d30f925060499367172b566d0842", + "size": 0, + "url": "https://api.github.com/repos/vikram-raj/hello-func-node/contents/test?ref=master", + "html_url": "https://github.com/vikram-raj/hello-func-node/tree/master/test", + "git_url": "https://api.github.com/repos/vikram-raj/hello-func-node/git/trees/9cea2aab5cb7d30f925060499367172b566d0842", + "download_url": null, + "type": "dir", + "_links": { + "self": "https://api.github.com/repos/vikram-raj/hello-func-node/contents/test?ref=master", + "git": "https://api.github.com/repos/vikram-raj/hello-func-node/git/trees/9cea2aab5cb7d30f925060499367172b566d0842", + "html": "https://github.com/vikram-raj/hello-func-node/tree/master/test" + } + } + ] \ No newline at end of file diff --git a/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-node/func.json b/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-node/func.json new file mode 100644 index 000000000000..65a3a91ca749 --- /dev/null +++ b/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-node/func.json @@ -0,0 +1,18 @@ +{ + "name": "func.yaml", + "path": "func.yaml", + "sha": "296531d91cee272407f90494bca2a20736b4ff30", + "size": 364, + "url": "https://api.github.com/repos/vikram-raj/hello-func-node/contents/func.yaml?ref=master", + "html_url": "https://github.com/vikram-raj/hello-func-node/blob/master/func.yaml", + "git_url": "https://api.github.com/repos/vikram-raj/hello-func-node/git/blobs/296531d91cee272407f90494bca2a20736b4ff30", + "download_url": "https://raw.githubusercontent.com/vikram-raj/hello-func-node/master/func.yaml", + "type": "file", + "content": "c3BlY1ZlcnNpb246IDAuMzQuMApuYW1lOiBoZWxsby1mdW5jLW5vZGUKcnVu\ndGltZTogbm9kZQpyZWdpc3RyeTogJycKaW1hZ2U6ICcnCmludm9jYXRpb246\nCiAgZm9ybWF0OiBodHRwCmJ1aWxkOgogIGJ1aWxkcGFja3M6IFtdCiAgYnVp\nbGRlcjogczJpCiAgYnVpbGRFbnZzOiBbXQpydW46CiAgdm9sdW1lczogW10K\nICBlbnZzOgogIC0gbmFtZTogTVlfQVBJX0tFWQogICAgdmFsdWU6ICcxMjM0\nNScKZGVwbG95OgogIGFubm90YXRpb25zOiB7fQogIG9wdGlvbnM6IHt9CiAg\nbGFiZWxzOiBbXQogIGhlYWx0aEVuZHBvaW50czoKICAgIGxpdmVuZXNzOiAv\naGVhbHRoL2xpdmVuZXNzCiAgICByZWFkaW5lc3M6IC9oZWFsdGgvcmVhZGlu\nZXNzCg==\n", + "encoding": "base64", + "_links": { + "self": "https://api.github.com/repos/vikram-raj/hello-func-node/contents/func.yaml?ref=master", + "git": "https://api.github.com/repos/vikram-raj/hello-func-node/git/blobs/296531d91cee272407f90494bca2a20736b4ff30", + "html": "https://github.com/vikram-raj/hello-func-node/blob/master/func.yaml" + } +} \ No newline at end of file diff --git a/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-node/package.json b/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-node/package.json new file mode 100644 index 000000000000..f5054cefcd19 --- /dev/null +++ b/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-node/package.json @@ -0,0 +1,18 @@ +{ + "name": "package.json", + "path": "package.json", + "sha": "2806b7a4ce0a7caf6f1e3d9c0a833c81db97f7eb", + "size": 565, + "url": "https://api.github.com/repos/vikram-raj/hello-func-node/contents/package.json?ref=master", + "html_url": "https://github.com/vikram-raj/hello-func-node/blob/master/package.json", + "git_url": "https://api.github.com/repos/vikram-raj/hello-func-node/git/blobs/2806b7a4ce0a7caf6f1e3d9c0a833c81db97f7eb", + "download_url": "https://raw.githubusercontent.com/vikram-raj/hello-func-node/master/package.json", + "type": "file", + "content": "ewogICJuYW1lIjogImh0dHAtaGFuZGxlciIsCiAgInZlcnNpb24iOiAiMC4x\nLjAiLAogICJkZXNjcmlwdGlvbiI6ICJBIGZ1bmN0aW9uIHdoaWNoIHJlc3Bv\nbmRzIHRvIEhUVFAgcmVxdWVzdHMiLAogICJtYWluIjogImluZGV4LmpzIiwK\nICAic2NyaXB0cyI6IHsKICAgICJ0ZXN0IjogIm5vZGUgdGVzdC91bml0Lmpz\nICYmIG5vZGUgdGVzdC9pbnRlZ3JhdGlvbi5qcyIsCiAgICAic3RhcnQiOiAi\nZmFhcy1qcy1ydW50aW1lIC4vaW5kZXguanMiLAogICAgImRlYnVnIjogIm5v\nZGVtb24gLS1pbnNwZWN0IC4vbm9kZV9tb2R1bGVzL2ZhYXMtanMtcnVudGlt\nZS9iaW4vY2xpLmpzIC4vaW5kZXguanMiCiAgfSwKICAia2V5d29yZHMiOiBb\nXSwKICAiYXV0aG9yIjogIiIsCiAgImxpY2Vuc2UiOiAiQXBhY2hlLTIuMCIs\nCiAgImRlcGVuZGVuY2llcyI6IHsKICAgICJmYWFzLWpzLXJ1bnRpbWUiOiAi\nXjAuOS4wIgogIH0sCiAgImRldkRlcGVuZGVuY2llcyI6IHsKICAgICJub2Rl\nbW9uIjogIl4yLjAuNCIsCiAgICAic3VwZXJ0ZXN0IjogIl40LjAuMiIsCiAg\nICAidGFwZSI6ICJeNS4wLjEiCiAgfQp9Cg==\n", + "encoding": "base64", + "_links": { + "self": "https://api.github.com/repos/vikram-raj/hello-func-node/contents/package.json?ref=master", + "git": "https://api.github.com/repos/vikram-raj/hello-func-node/git/blobs/2806b7a4ce0a7caf6f1e3d9c0a833c81db97f7eb", + "html": "https://github.com/vikram-raj/hello-func-node/blob/master/package.json" + } +} diff --git a/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-node/repo.json b/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-node/repo.json new file mode 100644 index 000000000000..fa3a76df3c03 --- /dev/null +++ b/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-node/repo.json @@ -0,0 +1,105 @@ +{ + "id": 561716556, + "node_id": "R_kgDOIXsdTA", + "name": "hello-func-node", + "full_name": "vikram-raj/hello-func-node", + "private": false, + "owner": { + "login": "vikram-raj", + "id": 2561818, + "node_id": "MDQ6VXNlcjI1NjE4MTg=", + "avatar_url": "https://avatars.githubusercontent.com/u/2561818?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/vikram-raj", + "html_url": "https://github.com/vikram-raj", + "followers_url": "https://api.github.com/users/vikram-raj/followers", + "following_url": "https://api.github.com/users/vikram-raj/following{/other_user}", + "gists_url": "https://api.github.com/users/vikram-raj/gists{/gist_id}", + "starred_url": "https://api.github.com/users/vikram-raj/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/vikram-raj/subscriptions", + "organizations_url": "https://api.github.com/users/vikram-raj/orgs", + "repos_url": "https://api.github.com/users/vikram-raj/repos", + "events_url": "https://api.github.com/users/vikram-raj/events{/privacy}", + "received_events_url": "https://api.github.com/users/vikram-raj/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/vikram-raj/hello-func-node", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/vikram-raj/hello-func-node", + "forks_url": "https://api.github.com/repos/vikram-raj/hello-func-node/forks", + "keys_url": "https://api.github.com/repos/vikram-raj/hello-func-node/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/vikram-raj/hello-func-node/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/vikram-raj/hello-func-node/teams", + "hooks_url": "https://api.github.com/repos/vikram-raj/hello-func-node/hooks", + "issue_events_url": "https://api.github.com/repos/vikram-raj/hello-func-node/issues/events{/number}", + "events_url": "https://api.github.com/repos/vikram-raj/hello-func-node/events", + "assignees_url": "https://api.github.com/repos/vikram-raj/hello-func-node/assignees{/user}", + "branches_url": "https://api.github.com/repos/vikram-raj/hello-func-node/branches{/branch}", + "tags_url": "https://api.github.com/repos/vikram-raj/hello-func-node/tags", + "blobs_url": "https://api.github.com/repos/vikram-raj/hello-func-node/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/vikram-raj/hello-func-node/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/vikram-raj/hello-func-node/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/vikram-raj/hello-func-node/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/vikram-raj/hello-func-node/statuses/{sha}", + "languages_url": "https://api.github.com/repos/vikram-raj/hello-func-node/languages", + "stargazers_url": "https://api.github.com/repos/vikram-raj/hello-func-node/stargazers", + "contributors_url": "https://api.github.com/repos/vikram-raj/hello-func-node/contributors", + "subscribers_url": "https://api.github.com/repos/vikram-raj/hello-func-node/subscribers", + "subscription_url": "https://api.github.com/repos/vikram-raj/hello-func-node/subscription", + "commits_url": "https://api.github.com/repos/vikram-raj/hello-func-node/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/vikram-raj/hello-func-node/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/vikram-raj/hello-func-node/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/vikram-raj/hello-func-node/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/vikram-raj/hello-func-node/contents/{+path}", + "compare_url": "https://api.github.com/repos/vikram-raj/hello-func-node/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/vikram-raj/hello-func-node/merges", + "archive_url": "https://api.github.com/repos/vikram-raj/hello-func-node/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/vikram-raj/hello-func-node/downloads", + "issues_url": "https://api.github.com/repos/vikram-raj/hello-func-node/issues{/number}", + "pulls_url": "https://api.github.com/repos/vikram-raj/hello-func-node/pulls{/number}", + "milestones_url": "https://api.github.com/repos/vikram-raj/hello-func-node/milestones{/number}", + "notifications_url": "https://api.github.com/repos/vikram-raj/hello-func-node/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/vikram-raj/hello-func-node/labels{/name}", + "releases_url": "https://api.github.com/repos/vikram-raj/hello-func-node/releases{/id}", + "deployments_url": "https://api.github.com/repos/vikram-raj/hello-func-node/deployments", + "created_at": "2022-11-04T10:27:10Z", + "updated_at": "2022-11-17T08:20:02Z", + "pushed_at": "2023-02-13T17:49:55Z", + "git_url": "git://github.com/vikram-raj/hello-func-node.git", + "ssh_url": "git@github.com:vikram-raj/hello-func-node.git", + "clone_url": "https://github.com/vikram-raj/hello-func-node.git", + "svn_url": "https://github.com/vikram-raj/hello-func-node", + "homepage": null, + "size": 49, + "stargazers_count": 0, + "watchers_count": 0, + "language": "JavaScript", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [ + + ], + "visibility": "public", + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "master", + "temp_clone_token": null, + "network_count": 1, + "subscribers_count": 1 + } diff --git a/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-quarkus/contents.json b/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-quarkus/contents.json new file mode 100644 index 000000000000..d71d13f969ca --- /dev/null +++ b/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-quarkus/contents.json @@ -0,0 +1,130 @@ +[ + { + "name": ".gitignore", + "path": ".gitignore", + "sha": "3abd5fdff11e295a0d72346ac99fe7034da1c6cb", + "size": 126, + "url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/contents/.gitignore?ref=master", + "html_url": "https://github.com/vikram-raj/hello-func-quarkus/blob/master/.gitignore", + "git_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/git/blobs/3abd5fdff11e295a0d72346ac99fe7034da1c6cb", + "download_url": "https://raw.githubusercontent.com/vikram-raj/hello-func-quarkus/master/.gitignore", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/contents/.gitignore?ref=master", + "git": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/git/blobs/3abd5fdff11e295a0d72346ac99fe7034da1c6cb", + "html": "https://github.com/vikram-raj/hello-func-quarkus/blob/master/.gitignore" + } + }, + { + "name": ".mvn", + "path": ".mvn", + "sha": "321dbd85deb16a24bcc0a29b974aa7a9bab5f85c", + "size": 0, + "url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/contents/.mvn?ref=master", + "html_url": "https://github.com/vikram-raj/hello-func-quarkus/tree/master/.mvn", + "git_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/git/trees/321dbd85deb16a24bcc0a29b974aa7a9bab5f85c", + "download_url": null, + "type": "dir", + "_links": { + "self": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/contents/.mvn?ref=master", + "git": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/git/trees/321dbd85deb16a24bcc0a29b974aa7a9bab5f85c", + "html": "https://github.com/vikram-raj/hello-func-quarkus/tree/master/.mvn" + } + }, + { + "name": "README.md", + "path": "README.md", + "sha": "db59866a5a0668c68245b07c538f0dd5ba145bbe", + "size": 2276, + "url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/contents/README.md?ref=master", + "html_url": "https://github.com/vikram-raj/hello-func-quarkus/blob/master/README.md", + "git_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/git/blobs/db59866a5a0668c68245b07c538f0dd5ba145bbe", + "download_url": "https://raw.githubusercontent.com/vikram-raj/hello-func-quarkus/master/README.md", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/contents/README.md?ref=master", + "git": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/git/blobs/db59866a5a0668c68245b07c538f0dd5ba145bbe", + "html": "https://github.com/vikram-raj/hello-func-quarkus/blob/master/README.md" + } + }, + { + "name": "func.yaml", + "path": "func.yaml", + "sha": "afa4aa0b8b1cce8265bd358ece2aab321d38ad77", + "size": 1014, + "url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/contents/func.yaml?ref=master", + "html_url": "https://github.com/vikram-raj/hello-func-quarkus/blob/master/func.yaml", + "git_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/git/blobs/afa4aa0b8b1cce8265bd358ece2aab321d38ad77", + "download_url": "https://raw.githubusercontent.com/vikram-raj/hello-func-quarkus/master/func.yaml", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/contents/func.yaml?ref=master", + "git": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/git/blobs/afa4aa0b8b1cce8265bd358ece2aab321d38ad77", + "html": "https://github.com/vikram-raj/hello-func-quarkus/blob/master/func.yaml" + } + }, + { + "name": "mvnw", + "path": "mvnw", + "sha": "41c0f0c23db5dca836d3db1a17a7a28444d17d74", + "size": 10069, + "url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/contents/mvnw?ref=master", + "html_url": "https://github.com/vikram-raj/hello-func-quarkus/blob/master/mvnw", + "git_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/git/blobs/41c0f0c23db5dca836d3db1a17a7a28444d17d74", + "download_url": "https://raw.githubusercontent.com/vikram-raj/hello-func-quarkus/master/mvnw", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/contents/mvnw?ref=master", + "git": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/git/blobs/41c0f0c23db5dca836d3db1a17a7a28444d17d74", + "html": "https://github.com/vikram-raj/hello-func-quarkus/blob/master/mvnw" + } + }, + { + "name": "mvnw.cmd", + "path": "mvnw.cmd", + "sha": "86115719e5383e94597f918bf18c5ecbb7cfe492", + "size": 6607, + "url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/contents/mvnw.cmd?ref=master", + "html_url": "https://github.com/vikram-raj/hello-func-quarkus/blob/master/mvnw.cmd", + "git_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/git/blobs/86115719e5383e94597f918bf18c5ecbb7cfe492", + "download_url": "https://raw.githubusercontent.com/vikram-raj/hello-func-quarkus/master/mvnw.cmd", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/contents/mvnw.cmd?ref=master", + "git": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/git/blobs/86115719e5383e94597f918bf18c5ecbb7cfe492", + "html": "https://github.com/vikram-raj/hello-func-quarkus/blob/master/mvnw.cmd" + } + }, + { + "name": "pom.xml", + "path": "pom.xml", + "sha": "d20f62895f702f3dd5fcdc215ae40150d4b754c4", + "size": 4351, + "url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/contents/pom.xml?ref=master", + "html_url": "https://github.com/vikram-raj/hello-func-quarkus/blob/master/pom.xml", + "git_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/git/blobs/d20f62895f702f3dd5fcdc215ae40150d4b754c4", + "download_url": "https://raw.githubusercontent.com/vikram-raj/hello-func-quarkus/master/pom.xml", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/contents/pom.xml?ref=master", + "git": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/git/blobs/d20f62895f702f3dd5fcdc215ae40150d4b754c4", + "html": "https://github.com/vikram-raj/hello-func-quarkus/blob/master/pom.xml" + } + }, + { + "name": "src", + "path": "src", + "sha": "8f2034073149a21b1daf2a2f1e60a30fa3f4ccb5", + "size": 0, + "url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/contents/src?ref=master", + "html_url": "https://github.com/vikram-raj/hello-func-quarkus/tree/master/src", + "git_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/git/trees/8f2034073149a21b1daf2a2f1e60a30fa3f4ccb5", + "download_url": null, + "type": "dir", + "_links": { + "self": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/contents/src?ref=master", + "git": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/git/trees/8f2034073149a21b1daf2a2f1e60a30fa3f4ccb5", + "html": "https://github.com/vikram-raj/hello-func-quarkus/tree/master/src" + } + } + ] diff --git a/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-quarkus/func.json b/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-quarkus/func.json new file mode 100644 index 000000000000..c3e9c1e43fab --- /dev/null +++ b/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-quarkus/func.json @@ -0,0 +1,18 @@ +{ + "name": "func.yaml", + "path": "func.yaml", + "sha": "afa4aa0b8b1cce8265bd358ece2aab321d38ad77", + "size": 1014, + "url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/contents/func.yaml?ref=master", + "html_url": "https://github.com/vikram-raj/hello-func-quarkus/blob/master/func.yaml", + "git_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/git/blobs/afa4aa0b8b1cce8265bd358ece2aab321d38ad77", + "download_url": "https://raw.githubusercontent.com/vikram-raj/hello-func-quarkus/master/func.yaml", + "type": "file", + "content": "c3BlY1ZlcnNpb246IDAuMzQuMApuYW1lOiBoZWxsby1mdW5jLXF1YXJrdXMK\ncnVudGltZTogcXVhcmt1cwpyZWdpc3RyeTogcXVheS5pby92aXJhal8xCmlt\nYWdlOiBxdWF5LmlvL3ZpcmFqXzEvaGVsbG8tZnVuYy1xdWFya3VzOmxhdGVz\ndAppbWFnZURpZ2VzdDogc2hhMjU2OmFkNjMyZDNkNGQ0N2Q0NjM3YjA2Yjk3\nZjU1M2ZiMWRlODIxYTg2Mjk0ODU0MzE1Njc2YjViZDM2ZTllZWRiMzAKY3Jl\nYXRlZDogMjAyMi0xMS0xNlQxNjoxNjoxNC4wNTgzNDg2MDIrMDU6MzAKaW52\nb2NhdGlvbjoKICBmb3JtYXQ6IGh0dHAKYnVpbGQ6CiAgYnVpbGRwYWNrczog\nW10KICBidWlsZGVyOiBzMmkKICBidWlsZEVudnM6CiAgLSBuYW1lOiBCUF9O\nQVRJVkVfSU1BR0UKICAgIHZhbHVlOiAiZmFsc2UiCiAgLSBuYW1lOiBCUF9N\nQVZFTl9CVUlMVF9BUlRJRkFDVAogICAgdmFsdWU6IGZ1bmMueWFtbCB0YXJn\nZXQvcXVhcmt1cy1hcHAvbGliLyB0YXJnZXQvcXVhcmt1cy1hcHAvKi5qYXIg\ndGFyZ2V0L3F1YXJrdXMtYXBwL2FwcC8KICAgICAgdGFyZ2V0L3F1YXJrdXMt\nYXBwL3F1YXJrdXMvCiAgLSBuYW1lOiBCUF9NQVZFTl9CVUlMRF9BUkdVTUVO\nVFMKICAgIHZhbHVlOiBwYWNrYWdlIC1Ec2tpcFRlc3RzPXRydWUgLURtYXZl\nbi5qYXZhZG9jLnNraXA9dHJ1ZSAtRHF1YXJrdXMucGFja2FnZS50eXBlPWZh\nc3QtamFyCiAgLSBuYW1lOiBNQVZFTl9TMklfQVJUSUZBQ1RfRElSUwogICAg\ndmFsdWU6IHRhcmdldC9xdWFya3VzLWFwcAogIC0gbmFtZTogUzJJX1NPVVJD\nRV9ERVBMT1lNRU5UU19GSUxURVIKICAgIHZhbHVlOiBsaWIgcXVhcmt1cy1y\ndW4uamFyIGFwcCBxdWFya3VzCnJ1bjoKICB2b2x1bWVzOiBbXQogIGVudnM6\nIFtdCmRlcGxveToKICBuYW1lc3BhY2U6IHZpcmFqCiAgYW5ub3RhdGlvbnM6\nIHt9CiAgb3B0aW9uczoge30KICBsYWJlbHM6IFtdCiAgaGVhbHRoRW5kcG9p\nbnRzOgogICAgbGl2ZW5lc3M6IC9oZWFsdGgvbGl2ZW5lc3MKICAgIHJlYWRp\nbmVzczogL2hlYWx0aC9yZWFkaW5lc3MK\n", + "encoding": "base64", + "_links": { + "self": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/contents/func.yaml?ref=master", + "git": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/git/blobs/afa4aa0b8b1cce8265bd358ece2aab321d38ad77", + "html": "https://github.com/vikram-raj/hello-func-quarkus/blob/master/func.yaml" + } +} \ No newline at end of file diff --git a/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-quarkus/repo.json b/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-quarkus/repo.json new file mode 100644 index 000000000000..29d4f956e4ef --- /dev/null +++ b/frontend/packages/dev-console/integration-tests/testData/git-import/hello-func-quarkus/repo.json @@ -0,0 +1,105 @@ +{ + "id": 567175013, + "node_id": "R_kgDOIc5nZQ", + "name": "hello-func-quarkus", + "full_name": "vikram-raj/hello-func-quarkus", + "private": false, + "owner": { + "login": "vikram-raj", + "id": 2561818, + "node_id": "MDQ6VXNlcjI1NjE4MTg=", + "avatar_url": "https://avatars.githubusercontent.com/u/2561818?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/vikram-raj", + "html_url": "https://github.com/vikram-raj", + "followers_url": "https://api.github.com/users/vikram-raj/followers", + "following_url": "https://api.github.com/users/vikram-raj/following{/other_user}", + "gists_url": "https://api.github.com/users/vikram-raj/gists{/gist_id}", + "starred_url": "https://api.github.com/users/vikram-raj/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/vikram-raj/subscriptions", + "organizations_url": "https://api.github.com/users/vikram-raj/orgs", + "repos_url": "https://api.github.com/users/vikram-raj/repos", + "events_url": "https://api.github.com/users/vikram-raj/events{/privacy}", + "received_events_url": "https://api.github.com/users/vikram-raj/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/vikram-raj/hello-func-quarkus", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus", + "forks_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/forks", + "keys_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/teams", + "hooks_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/hooks", + "issue_events_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/issues/events{/number}", + "events_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/events", + "assignees_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/assignees{/user}", + "branches_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/branches{/branch}", + "tags_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/tags", + "blobs_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/statuses/{sha}", + "languages_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/languages", + "stargazers_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/stargazers", + "contributors_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/contributors", + "subscribers_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/subscribers", + "subscription_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/subscription", + "commits_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/contents/{+path}", + "compare_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/merges", + "archive_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/downloads", + "issues_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/issues{/number}", + "pulls_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/pulls{/number}", + "milestones_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/milestones{/number}", + "notifications_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/labels{/name}", + "releases_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/releases{/id}", + "deployments_url": "https://api.github.com/repos/vikram-raj/hello-func-quarkus/deployments", + "created_at": "2022-11-17T08:26:21Z", + "updated_at": "2022-11-17T08:27:02Z", + "pushed_at": "2023-01-17T01:31:12Z", + "git_url": "git://github.com/vikram-raj/hello-func-quarkus.git", + "ssh_url": "git@github.com:vikram-raj/hello-func-quarkus.git", + "clone_url": "https://github.com/vikram-raj/hello-func-quarkus.git", + "svn_url": "https://github.com/vikram-raj/hello-func-quarkus", + "homepage": null, + "size": 13, + "stargazers_count": 0, + "watchers_count": 0, + "language": "Java", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [ + + ], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "master", + "temp_clone_token": null, + "network_count": 0, + "subscribers_count": 1 + } diff --git a/frontend/packages/dev-console/integration-tests/testData/git-import/kn-func-typescript-cloudevents/contents.json b/frontend/packages/dev-console/integration-tests/testData/git-import/kn-func-typescript-cloudevents/contents.json new file mode 100644 index 000000000000..c23b1a08cefd --- /dev/null +++ b/frontend/packages/dev-console/integration-tests/testData/git-import/kn-func-typescript-cloudevents/contents.json @@ -0,0 +1,162 @@ +[ + { + "name": ".eslintrc", + "path": ".eslintrc", + "sha": "03c44bafb5e59cc0a5931256afc71df24937f44d", + "size": 457, + "url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/contents/.eslintrc?ref=main", + "html_url": "https://github.com/openshift-dev-console/kn-func-typescript-cloudevents/blob/main/.eslintrc", + "git_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/git/blobs/03c44bafb5e59cc0a5931256afc71df24937f44d", + "download_url": "https://raw.githubusercontent.com/openshift-dev-console/kn-func-typescript-cloudevents/main/.eslintrc", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/contents/.eslintrc?ref=main", + "git": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/git/blobs/03c44bafb5e59cc0a5931256afc71df24937f44d", + "html": "https://github.com/openshift-dev-console/kn-func-typescript-cloudevents/blob/main/.eslintrc" + } + }, + { + "name": ".gitignore", + "path": ".gitignore", + "sha": "3abd5fdff11e295a0d72346ac99fe7034da1c6cb", + "size": 126, + "url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/contents/.gitignore?ref=main", + "html_url": "https://github.com/openshift-dev-console/kn-func-typescript-cloudevents/blob/main/.gitignore", + "git_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/git/blobs/3abd5fdff11e295a0d72346ac99fe7034da1c6cb", + "download_url": "https://raw.githubusercontent.com/openshift-dev-console/kn-func-typescript-cloudevents/main/.gitignore", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/contents/.gitignore?ref=main", + "git": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/git/blobs/3abd5fdff11e295a0d72346ac99fe7034da1c6cb", + "html": "https://github.com/openshift-dev-console/kn-func-typescript-cloudevents/blob/main/.gitignore" + } + }, + { + "name": ".prettierrc", + "path": ".prettierrc", + "sha": "d2b80b80b387b3c5159b7f20413844850ed51748", + "size": 90, + "url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/contents/.prettierrc?ref=main", + "html_url": "https://github.com/openshift-dev-console/kn-func-typescript-cloudevents/blob/main/.prettierrc", + "git_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/git/blobs/d2b80b80b387b3c5159b7f20413844850ed51748", + "download_url": "https://raw.githubusercontent.com/openshift-dev-console/kn-func-typescript-cloudevents/main/.prettierrc", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/contents/.prettierrc?ref=main", + "git": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/git/blobs/d2b80b80b387b3c5159b7f20413844850ed51748", + "html": "https://github.com/openshift-dev-console/kn-func-typescript-cloudevents/blob/main/.prettierrc" + } + }, + { + "name": "README.md", + "path": "README.md", + "sha": "956f08860c7ccbdfd25c35b4e645155fc085e070", + "size": 1656, + "url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/contents/README.md?ref=main", + "html_url": "https://github.com/openshift-dev-console/kn-func-typescript-cloudevents/blob/main/README.md", + "git_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/git/blobs/956f08860c7ccbdfd25c35b4e645155fc085e070", + "download_url": "https://raw.githubusercontent.com/openshift-dev-console/kn-func-typescript-cloudevents/main/README.md", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/contents/README.md?ref=main", + "git": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/git/blobs/956f08860c7ccbdfd25c35b4e645155fc085e070", + "html": "https://github.com/openshift-dev-console/kn-func-typescript-cloudevents/blob/main/README.md" + } + }, + { + "name": "func.yaml", + "path": "func.yaml", + "sha": "a9a73b03d5b80a12919f514f070cbe0fc6316a80", + "size": 432, + "url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/contents/func.yaml?ref=main", + "html_url": "https://github.com/openshift-dev-console/kn-func-typescript-cloudevents/blob/main/func.yaml", + "git_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/git/blobs/a9a73b03d5b80a12919f514f070cbe0fc6316a80", + "download_url": "https://raw.githubusercontent.com/openshift-dev-console/kn-func-typescript-cloudevents/main/func.yaml", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/contents/func.yaml?ref=main", + "git": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/git/blobs/a9a73b03d5b80a12919f514f070cbe0fc6316a80", + "html": "https://github.com/openshift-dev-console/kn-func-typescript-cloudevents/blob/main/func.yaml" + } + }, + { + "name": "package-lock.json", + "path": "package-lock.json", + "sha": "7d701ae401bf3fb62ea82bcca2a30ceb8bd0a251", + "size": 297047, + "url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/contents/package-lock.json?ref=main", + "html_url": "https://github.com/openshift-dev-console/kn-func-typescript-cloudevents/blob/main/package-lock.json", + "git_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/git/blobs/7d701ae401bf3fb62ea82bcca2a30ceb8bd0a251", + "download_url": "https://raw.githubusercontent.com/openshift-dev-console/kn-func-typescript-cloudevents/main/package-lock.json", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/contents/package-lock.json?ref=main", + "git": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/git/blobs/7d701ae401bf3fb62ea82bcca2a30ceb8bd0a251", + "html": "https://github.com/openshift-dev-console/kn-func-typescript-cloudevents/blob/main/package-lock.json" + } + }, + { + "name": "package.json", + "path": "package.json", + "sha": "f4dc806d2f050d1a96cb9e47301015d48a723c87", + "size": 1336, + "url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/contents/package.json?ref=main", + "html_url": "https://github.com/openshift-dev-console/kn-func-typescript-cloudevents/blob/main/package.json", + "git_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/git/blobs/f4dc806d2f050d1a96cb9e47301015d48a723c87", + "download_url": "https://raw.githubusercontent.com/openshift-dev-console/kn-func-typescript-cloudevents/main/package.json", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/contents/package.json?ref=main", + "git": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/git/blobs/f4dc806d2f050d1a96cb9e47301015d48a723c87", + "html": "https://github.com/openshift-dev-console/kn-func-typescript-cloudevents/blob/main/package.json" + } + }, + { + "name": "src", + "path": "src", + "sha": "93a375a5a8bf422e82e2cb600f40e50fc487f0af", + "size": 0, + "url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/contents/src?ref=main", + "html_url": "https://github.com/openshift-dev-console/kn-func-typescript-cloudevents/tree/main/src", + "git_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/git/trees/93a375a5a8bf422e82e2cb600f40e50fc487f0af", + "download_url": null, + "type": "dir", + "_links": { + "self": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/contents/src?ref=main", + "git": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/git/trees/93a375a5a8bf422e82e2cb600f40e50fc487f0af", + "html": "https://github.com/openshift-dev-console/kn-func-typescript-cloudevents/tree/main/src" + } + }, + { + "name": "test", + "path": "test", + "sha": "c4e8f3e9a0104139eacf2869a3250615d68de213", + "size": 0, + "url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/contents/test?ref=main", + "html_url": "https://github.com/openshift-dev-console/kn-func-typescript-cloudevents/tree/main/test", + "git_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/git/trees/c4e8f3e9a0104139eacf2869a3250615d68de213", + "download_url": null, + "type": "dir", + "_links": { + "self": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/contents/test?ref=main", + "git": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/git/trees/c4e8f3e9a0104139eacf2869a3250615d68de213", + "html": "https://github.com/openshift-dev-console/kn-func-typescript-cloudevents/tree/main/test" + } + }, + { + "name": "tsconfig.json", + "path": "tsconfig.json", + "sha": "bbe4487b41fd333aea843fd133e3d250160fb703", + "size": 1830, + "url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/contents/tsconfig.json?ref=main", + "html_url": "https://github.com/openshift-dev-console/kn-func-typescript-cloudevents/blob/main/tsconfig.json", + "git_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/git/blobs/bbe4487b41fd333aea843fd133e3d250160fb703", + "download_url": "https://raw.githubusercontent.com/openshift-dev-console/kn-func-typescript-cloudevents/main/tsconfig.json", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/contents/tsconfig.json?ref=main", + "git": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/git/blobs/bbe4487b41fd333aea843fd133e3d250160fb703", + "html": "https://github.com/openshift-dev-console/kn-func-typescript-cloudevents/blob/main/tsconfig.json" + } + } + ] diff --git a/frontend/packages/dev-console/integration-tests/testData/git-import/kn-func-typescript-cloudevents/func.json b/frontend/packages/dev-console/integration-tests/testData/git-import/kn-func-typescript-cloudevents/func.json new file mode 100644 index 000000000000..c26bf735e616 --- /dev/null +++ b/frontend/packages/dev-console/integration-tests/testData/git-import/kn-func-typescript-cloudevents/func.json @@ -0,0 +1,18 @@ +{ + "name": "func.yaml", + "path": "func.yaml", + "sha": "a9a73b03d5b80a12919f514f070cbe0fc6316a80", + "size": 432, + "url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/contents/func.yaml?ref=main", + "html_url": "https://github.com/openshift-dev-console/kn-func-typescript-cloudevents/blob/main/func.yaml", + "git_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/git/blobs/a9a73b03d5b80a12919f514f070cbe0fc6316a80", + "download_url": "https://raw.githubusercontent.com/openshift-dev-console/kn-func-typescript-cloudevents/main/func.yaml", + "type": "file", + "content": "c3BlY1ZlcnNpb246IDAuMzUuMApuYW1lOiBrbi1mdW5jLXR5cGVzY3JpcHQt\nY2xvdWRldmVudHMKcnVudGltZTogdHlwZXNjcmlwdApyZWdpc3RyeTogIiIK\naW1hZ2U6ICIiCmltYWdlRGlnZXN0OiAiIgppbnZva2U6IGNsb3VkZXZlbnQK\nYnVpbGQ6CiAgYnVpbGRwYWNrczogW10KICBidWlsZGVyOiBzMmkKICBidWls\nZEVudnM6CiAgLSBuYW1lOiBCUF9OT0RFX1JVTl9TQ1JJUFRTCiAgICB2YWx1\nZTogYnVpbGQKcnVuOgogIHZvbHVtZXM6IFtdCiAgZW52czogW10KZGVwbG95\nOgogIG5hbWVzcGFjZTogIiIKICByZW1vdGU6IGZhbHNlCiAgYW5ub3RhdGlv\nbnM6IHt9CiAgb3B0aW9uczoge30KICBsYWJlbHM6IFtdCiAgaGVhbHRoRW5k\ncG9pbnRzOgogICAgbGl2ZW5lc3M6IC9oZWFsdGgvbGl2ZW5lc3MKICAgIHJl\nYWRpbmVzczogL2hlYWx0aC9yZWFkaW5lc3MK\n", + "encoding": "base64", + "_links": { + "self": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/contents/func.yaml?ref=main", + "git": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/git/blobs/a9a73b03d5b80a12919f514f070cbe0fc6316a80", + "html": "https://github.com/openshift-dev-console/kn-func-typescript-cloudevents/blob/main/func.yaml" + } +} \ No newline at end of file diff --git a/frontend/packages/dev-console/integration-tests/testData/git-import/kn-func-typescript-cloudevents/repo.json b/frontend/packages/dev-console/integration-tests/testData/git-import/kn-func-typescript-cloudevents/repo.json new file mode 100644 index 000000000000..e4cf8b0478c8 --- /dev/null +++ b/frontend/packages/dev-console/integration-tests/testData/git-import/kn-func-typescript-cloudevents/repo.json @@ -0,0 +1,125 @@ +{ + "id": 621518463, + "node_id": "R_kgDOJQuefw", + "name": "kn-func-typescript-cloudevents", + "full_name": "openshift-dev-console/kn-func-typescript-cloudevents", + "private": false, + "owner": { + "login": "openshift-dev-console", + "id": 123080219, + "node_id": "O_kgDOB1YOGw", + "avatar_url": "https://avatars.githubusercontent.com/u/123080219?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/openshift-dev-console", + "html_url": "https://github.com/openshift-dev-console", + "followers_url": "https://api.github.com/users/openshift-dev-console/followers", + "following_url": "https://api.github.com/users/openshift-dev-console/following{/other_user}", + "gists_url": "https://api.github.com/users/openshift-dev-console/gists{/gist_id}", + "starred_url": "https://api.github.com/users/openshift-dev-console/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/openshift-dev-console/subscriptions", + "organizations_url": "https://api.github.com/users/openshift-dev-console/orgs", + "repos_url": "https://api.github.com/users/openshift-dev-console/repos", + "events_url": "https://api.github.com/users/openshift-dev-console/events{/privacy}", + "received_events_url": "https://api.github.com/users/openshift-dev-console/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/openshift-dev-console/kn-func-typescript-cloudevents", + "description": "Knative func example created with [kn] func create -l typescript -t cloudevents", + "fork": false, + "url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents", + "forks_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/forks", + "keys_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/teams", + "hooks_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/hooks", + "issue_events_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/issues/events{/number}", + "events_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/events", + "assignees_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/assignees{/user}", + "branches_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/branches{/branch}", + "tags_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/tags", + "blobs_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/statuses/{sha}", + "languages_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/languages", + "stargazers_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/stargazers", + "contributors_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/contributors", + "subscribers_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/subscribers", + "subscription_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/subscription", + "commits_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/contents/{+path}", + "compare_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/merges", + "archive_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/downloads", + "issues_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/issues{/number}", + "pulls_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/pulls{/number}", + "milestones_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/milestones{/number}", + "notifications_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/labels{/name}", + "releases_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/releases{/id}", + "deployments_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-cloudevents/deployments", + "created_at": "2023-03-30T20:34:38Z", + "updated_at": "2023-03-30T21:00:31Z", + "pushed_at": "2023-03-30T20:53:09Z", + "git_url": "git://github.com/openshift-dev-console/kn-func-typescript-cloudevents.git", + "ssh_url": "git@github.com:openshift-dev-console/kn-func-typescript-cloudevents.git", + "clone_url": "https://github.com/openshift-dev-console/kn-func-typescript-cloudevents.git", + "svn_url": "https://github.com/openshift-dev-console/kn-func-typescript-cloudevents", + "homepage": "", + "size": 84, + "stargazers_count": 0, + "watchers_count": 0, + "language": "TypeScript", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [ + + ], + "visibility": "public", + "forks": 1, + "open_issues": 0, + "watchers": 0, + "default_branch": "main", + "temp_clone_token": null, + "organization": { + "login": "openshift-dev-console", + "id": 123080219, + "node_id": "O_kgDOB1YOGw", + "avatar_url": "https://avatars.githubusercontent.com/u/123080219?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/openshift-dev-console", + "html_url": "https://github.com/openshift-dev-console", + "followers_url": "https://api.github.com/users/openshift-dev-console/followers", + "following_url": "https://api.github.com/users/openshift-dev-console/following{/other_user}", + "gists_url": "https://api.github.com/users/openshift-dev-console/gists{/gist_id}", + "starred_url": "https://api.github.com/users/openshift-dev-console/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/openshift-dev-console/subscriptions", + "organizations_url": "https://api.github.com/users/openshift-dev-console/orgs", + "repos_url": "https://api.github.com/users/openshift-dev-console/repos", + "events_url": "https://api.github.com/users/openshift-dev-console/events{/privacy}", + "received_events_url": "https://api.github.com/users/openshift-dev-console/received_events", + "type": "Organization", + "site_admin": false + }, + "network_count": 1, + "subscribers_count": 1 + } diff --git a/frontend/packages/dev-console/integration-tests/testData/git-import/kn-func-typescript-http/contents.json b/frontend/packages/dev-console/integration-tests/testData/git-import/kn-func-typescript-http/contents.json new file mode 100644 index 000000000000..b187270652fe --- /dev/null +++ b/frontend/packages/dev-console/integration-tests/testData/git-import/kn-func-typescript-http/contents.json @@ -0,0 +1,162 @@ +[ + { + "name": ".eslintrc", + "path": ".eslintrc", + "sha": "f9d619ca7dbe59d7fa9ca8fd7c5a9122b254d03d", + "size": 458, + "url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/contents/.eslintrc?ref=main", + "html_url": "https://github.com/openshift-dev-console/kn-func-typescript-http/blob/main/.eslintrc", + "git_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/git/blobs/f9d619ca7dbe59d7fa9ca8fd7c5a9122b254d03d", + "download_url": "https://raw.githubusercontent.com/openshift-dev-console/kn-func-typescript-http/main/.eslintrc", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/contents/.eslintrc?ref=main", + "git": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/git/blobs/f9d619ca7dbe59d7fa9ca8fd7c5a9122b254d03d", + "html": "https://github.com/openshift-dev-console/kn-func-typescript-http/blob/main/.eslintrc" + } + }, + { + "name": ".gitignore", + "path": ".gitignore", + "sha": "3abd5fdff11e295a0d72346ac99fe7034da1c6cb", + "size": 126, + "url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/contents/.gitignore?ref=main", + "html_url": "https://github.com/openshift-dev-console/kn-func-typescript-http/blob/main/.gitignore", + "git_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/git/blobs/3abd5fdff11e295a0d72346ac99fe7034da1c6cb", + "download_url": "https://raw.githubusercontent.com/openshift-dev-console/kn-func-typescript-http/main/.gitignore", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/contents/.gitignore?ref=main", + "git": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/git/blobs/3abd5fdff11e295a0d72346ac99fe7034da1c6cb", + "html": "https://github.com/openshift-dev-console/kn-func-typescript-http/blob/main/.gitignore" + } + }, + { + "name": ".prettierrc", + "path": ".prettierrc", + "sha": "0706fd1552751fdb3b3e69defb7135b426b18616", + "size": 90, + "url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/contents/.prettierrc?ref=main", + "html_url": "https://github.com/openshift-dev-console/kn-func-typescript-http/blob/main/.prettierrc", + "git_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/git/blobs/0706fd1552751fdb3b3e69defb7135b426b18616", + "download_url": "https://raw.githubusercontent.com/openshift-dev-console/kn-func-typescript-http/main/.prettierrc", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/contents/.prettierrc?ref=main", + "git": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/git/blobs/0706fd1552751fdb3b3e69defb7135b426b18616", + "html": "https://github.com/openshift-dev-console/kn-func-typescript-http/blob/main/.prettierrc" + } + }, + { + "name": "README.md", + "path": "README.md", + "sha": "d6cc12f6d20a25cf0bf414ca0099e0dd1270d8c9", + "size": 1889, + "url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/contents/README.md?ref=main", + "html_url": "https://github.com/openshift-dev-console/kn-func-typescript-http/blob/main/README.md", + "git_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/git/blobs/d6cc12f6d20a25cf0bf414ca0099e0dd1270d8c9", + "download_url": "https://raw.githubusercontent.com/openshift-dev-console/kn-func-typescript-http/main/README.md", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/contents/README.md?ref=main", + "git": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/git/blobs/d6cc12f6d20a25cf0bf414ca0099e0dd1270d8c9", + "html": "https://github.com/openshift-dev-console/kn-func-typescript-http/blob/main/README.md" + } + }, + { + "name": "func.yaml", + "path": "func.yaml", + "sha": "91767c9c02cee2efe4fe901e10ca94a2fbda3f54", + "size": 406, + "url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/contents/func.yaml?ref=main", + "html_url": "https://github.com/openshift-dev-console/kn-func-typescript-http/blob/main/func.yaml", + "git_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/git/blobs/91767c9c02cee2efe4fe901e10ca94a2fbda3f54", + "download_url": "https://raw.githubusercontent.com/openshift-dev-console/kn-func-typescript-http/main/func.yaml", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/contents/func.yaml?ref=main", + "git": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/git/blobs/91767c9c02cee2efe4fe901e10ca94a2fbda3f54", + "html": "https://github.com/openshift-dev-console/kn-func-typescript-http/blob/main/func.yaml" + } + }, + { + "name": "package-lock.json", + "path": "package-lock.json", + "sha": "ac311a535ab217264cfd5d8510112a40f4f07f9b", + "size": 296890, + "url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/contents/package-lock.json?ref=main", + "html_url": "https://github.com/openshift-dev-console/kn-func-typescript-http/blob/main/package-lock.json", + "git_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/git/blobs/ac311a535ab217264cfd5d8510112a40f4f07f9b", + "download_url": "https://raw.githubusercontent.com/openshift-dev-console/kn-func-typescript-http/main/package-lock.json", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/contents/package-lock.json?ref=main", + "git": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/git/blobs/ac311a535ab217264cfd5d8510112a40f4f07f9b", + "html": "https://github.com/openshift-dev-console/kn-func-typescript-http/blob/main/package-lock.json" + } + }, + { + "name": "package.json", + "path": "package.json", + "sha": "3736c3a890ae67db07e77ec5b12fd22680d50faf", + "size": 1301, + "url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/contents/package.json?ref=main", + "html_url": "https://github.com/openshift-dev-console/kn-func-typescript-http/blob/main/package.json", + "git_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/git/blobs/3736c3a890ae67db07e77ec5b12fd22680d50faf", + "download_url": "https://raw.githubusercontent.com/openshift-dev-console/kn-func-typescript-http/main/package.json", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/contents/package.json?ref=main", + "git": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/git/blobs/3736c3a890ae67db07e77ec5b12fd22680d50faf", + "html": "https://github.com/openshift-dev-console/kn-func-typescript-http/blob/main/package.json" + } + }, + { + "name": "src", + "path": "src", + "sha": "80c0fadc3c8404384d87c8bd0cfadada12556314", + "size": 0, + "url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/contents/src?ref=main", + "html_url": "https://github.com/openshift-dev-console/kn-func-typescript-http/tree/main/src", + "git_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/git/trees/80c0fadc3c8404384d87c8bd0cfadada12556314", + "download_url": null, + "type": "dir", + "_links": { + "self": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/contents/src?ref=main", + "git": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/git/trees/80c0fadc3c8404384d87c8bd0cfadada12556314", + "html": "https://github.com/openshift-dev-console/kn-func-typescript-http/tree/main/src" + } + }, + { + "name": "test", + "path": "test", + "sha": "9c3fe3b01ca33d4caefa4599074dbd3634f9d809", + "size": 0, + "url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/contents/test?ref=main", + "html_url": "https://github.com/openshift-dev-console/kn-func-typescript-http/tree/main/test", + "git_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/git/trees/9c3fe3b01ca33d4caefa4599074dbd3634f9d809", + "download_url": null, + "type": "dir", + "_links": { + "self": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/contents/test?ref=main", + "git": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/git/trees/9c3fe3b01ca33d4caefa4599074dbd3634f9d809", + "html": "https://github.com/openshift-dev-console/kn-func-typescript-http/tree/main/test" + } + }, + { + "name": "tsconfig.json", + "path": "tsconfig.json", + "sha": "bbe4487b41fd333aea843fd133e3d250160fb703", + "size": 1830, + "url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/contents/tsconfig.json?ref=main", + "html_url": "https://github.com/openshift-dev-console/kn-func-typescript-http/blob/main/tsconfig.json", + "git_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/git/blobs/bbe4487b41fd333aea843fd133e3d250160fb703", + "download_url": "https://raw.githubusercontent.com/openshift-dev-console/kn-func-typescript-http/main/tsconfig.json", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/contents/tsconfig.json?ref=main", + "git": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/git/blobs/bbe4487b41fd333aea843fd133e3d250160fb703", + "html": "https://github.com/openshift-dev-console/kn-func-typescript-http/blob/main/tsconfig.json" + } + } + ] diff --git a/frontend/packages/dev-console/integration-tests/testData/git-import/kn-func-typescript-http/func.json b/frontend/packages/dev-console/integration-tests/testData/git-import/kn-func-typescript-http/func.json new file mode 100644 index 000000000000..4e34374ced39 --- /dev/null +++ b/frontend/packages/dev-console/integration-tests/testData/git-import/kn-func-typescript-http/func.json @@ -0,0 +1,18 @@ +{ + "name": "func.yaml", + "path": "func.yaml", + "sha": "91767c9c02cee2efe4fe901e10ca94a2fbda3f54", + "size": 406, + "url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/contents/func.yaml?ref=main", + "html_url": "https://github.com/openshift-dev-console/kn-func-typescript-http/blob/main/func.yaml", + "git_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/git/blobs/91767c9c02cee2efe4fe901e10ca94a2fbda3f54", + "download_url": "https://raw.githubusercontent.com/openshift-dev-console/kn-func-typescript-http/main/func.yaml", + "type": "file", + "content": "c3BlY1ZlcnNpb246IDAuMzUuMApuYW1lOiBrbi1mdW5jLXR5cGVzY3JpcHQt\naHR0cApydW50aW1lOiB0eXBlc2NyaXB0CnJlZ2lzdHJ5OiAiIgppbWFnZTog\nIiIKaW1hZ2VEaWdlc3Q6ICIiCmJ1aWxkOgogIGJ1aWxkcGFja3M6IFtdCiAg\nYnVpbGRlcjogczJpCiAgYnVpbGRFbnZzOgogIC0gbmFtZTogQlBfTk9ERV9S\nVU5fU0NSSVBUUwogICAgdmFsdWU6IGJ1aWxkCnJ1bjoKICB2b2x1bWVzOiBb\nXQogIGVudnM6IFtdCmRlcGxveToKICBuYW1lc3BhY2U6ICIiCiAgcmVtb3Rl\nOiBmYWxzZQogIGFubm90YXRpb25zOiB7fQogIG9wdGlvbnM6IHt9CiAgbGFi\nZWxzOiBbXQogIGhlYWx0aEVuZHBvaW50czoKICAgIGxpdmVuZXNzOiAvaGVh\nbHRoL2xpdmVuZXNzCiAgICByZWFkaW5lc3M6IC9oZWFsdGgvcmVhZGluZXNz\nCg==\n", + "encoding": "base64", + "_links": { + "self": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/contents/func.yaml?ref=main", + "git": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/git/blobs/91767c9c02cee2efe4fe901e10ca94a2fbda3f54", + "html": "https://github.com/openshift-dev-console/kn-func-typescript-http/blob/main/func.yaml" + } +} diff --git a/frontend/packages/dev-console/integration-tests/testData/git-import/kn-func-typescript-http/repo.json b/frontend/packages/dev-console/integration-tests/testData/git-import/kn-func-typescript-http/repo.json new file mode 100644 index 000000000000..16457827efb8 --- /dev/null +++ b/frontend/packages/dev-console/integration-tests/testData/git-import/kn-func-typescript-http/repo.json @@ -0,0 +1,125 @@ +{ + "id": 621518477, + "node_id": "R_kgDOJQuejQ", + "name": "kn-func-typescript-http", + "full_name": "openshift-dev-console/kn-func-typescript-http", + "private": false, + "owner": { + "login": "openshift-dev-console", + "id": 123080219, + "node_id": "O_kgDOB1YOGw", + "avatar_url": "https://avatars.githubusercontent.com/u/123080219?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/openshift-dev-console", + "html_url": "https://github.com/openshift-dev-console", + "followers_url": "https://api.github.com/users/openshift-dev-console/followers", + "following_url": "https://api.github.com/users/openshift-dev-console/following{/other_user}", + "gists_url": "https://api.github.com/users/openshift-dev-console/gists{/gist_id}", + "starred_url": "https://api.github.com/users/openshift-dev-console/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/openshift-dev-console/subscriptions", + "organizations_url": "https://api.github.com/users/openshift-dev-console/orgs", + "repos_url": "https://api.github.com/users/openshift-dev-console/repos", + "events_url": "https://api.github.com/users/openshift-dev-console/events{/privacy}", + "received_events_url": "https://api.github.com/users/openshift-dev-console/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/openshift-dev-console/kn-func-typescript-http", + "description": "Knative func example created with [kn] func create -l typescript -t http", + "fork": false, + "url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http", + "forks_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/forks", + "keys_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/teams", + "hooks_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/hooks", + "issue_events_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/issues/events{/number}", + "events_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/events", + "assignees_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/assignees{/user}", + "branches_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/branches{/branch}", + "tags_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/tags", + "blobs_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/statuses/{sha}", + "languages_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/languages", + "stargazers_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/stargazers", + "contributors_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/contributors", + "subscribers_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/subscribers", + "subscription_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/subscription", + "commits_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/contents/{+path}", + "compare_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/merges", + "archive_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/downloads", + "issues_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/issues{/number}", + "pulls_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/pulls{/number}", + "milestones_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/milestones{/number}", + "notifications_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/labels{/name}", + "releases_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/releases{/id}", + "deployments_url": "https://api.github.com/repos/openshift-dev-console/kn-func-typescript-http/deployments", + "created_at": "2023-03-30T20:34:40Z", + "updated_at": "2023-03-30T21:00:39Z", + "pushed_at": "2023-03-30T20:53:11Z", + "git_url": "git://github.com/openshift-dev-console/kn-func-typescript-http.git", + "ssh_url": "git@github.com:openshift-dev-console/kn-func-typescript-http.git", + "clone_url": "https://github.com/openshift-dev-console/kn-func-typescript-http.git", + "svn_url": "https://github.com/openshift-dev-console/kn-func-typescript-http", + "homepage": "", + "size": 84, + "stargazers_count": 1, + "watchers_count": 1, + "language": "TypeScript", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 1, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [ + + ], + "visibility": "public", + "forks": 1, + "open_issues": 0, + "watchers": 1, + "default_branch": "main", + "temp_clone_token": null, + "organization": { + "login": "openshift-dev-console", + "id": 123080219, + "node_id": "O_kgDOB1YOGw", + "avatar_url": "https://avatars.githubusercontent.com/u/123080219?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/openshift-dev-console", + "html_url": "https://github.com/openshift-dev-console", + "followers_url": "https://api.github.com/users/openshift-dev-console/followers", + "following_url": "https://api.github.com/users/openshift-dev-console/following{/other_user}", + "gists_url": "https://api.github.com/users/openshift-dev-console/gists{/gist_id}", + "starred_url": "https://api.github.com/users/openshift-dev-console/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/openshift-dev-console/subscriptions", + "organizations_url": "https://api.github.com/users/openshift-dev-console/orgs", + "repos_url": "https://api.github.com/users/openshift-dev-console/repos", + "events_url": "https://api.github.com/users/openshift-dev-console/events{/privacy}", + "received_events_url": "https://api.github.com/users/openshift-dev-console/received_events", + "type": "Organization", + "site_admin": false + }, + "network_count": 1, + "subscribers_count": 1 + } diff --git a/frontend/packages/dev-console/integration-tests/testData/git-import/repos.ts b/frontend/packages/dev-console/integration-tests/testData/git-import/repos.ts index 3e216322342a..7866bae27016 100644 --- a/frontend/packages/dev-console/integration-tests/testData/git-import/repos.ts +++ b/frontend/packages/dev-console/integration-tests/testData/git-import/repos.ts @@ -14,6 +14,30 @@ export const gitImportRepos: GithubRepo[] = [ url: 'https://github.com/rohitkrai03/flask-dockerfile-example', folder: 'flask-dockerfile-example', }, + { + url: 'https://github.com/Lucifergene/serverless-func-repo', + folder: 'serverless-func-repo', + }, + { + url: 'https://github.com/vikram-raj/hello-func-node', + folder: 'hello-func-node', + }, + { + url: 'https://github.com/vikram-raj/hello-func-node-env', + folder: 'hello-func-node-env', + }, + { + url: 'https://github.com/vikram-raj/hello-func-quarkus', + folder: 'hello-func-quarkus', + }, + { + url: 'https://github.com/openshift-dev-console/kn-func-typescript-http', + folder: 'kn-func-typescript-http', + }, + { + url: 'https://github.com/openshift-dev-console/kn-func-typescript-cloudevents', + folder: 'kn-func-typescript-cloudevents', + }, ]; interface GithubRepo { @@ -27,6 +51,7 @@ export function getResponseMocks(repo: GithubRepo) { let packageJson = null; let devFileResources = null; + let funcJson = null; try { packageJson = require(`./${repo.folder}/package.json`); } catch (err) { @@ -37,10 +62,16 @@ export function getResponseMocks(repo: GithubRepo) { } catch (err) { // nothing, the file does not exist } + try { + funcJson = require(`./${repo.folder}/func.json`); + } catch (err) { + // nothing, the file does not exist + } return { repoResponse: repoJson, contentsResponse: contentsJson, packageResponse: packageJson, devFileResources, + funcJson, }; } diff --git a/frontend/packages/dev-console/integration-tests/testData/git-import/serverless-func-repo/contents.json b/frontend/packages/dev-console/integration-tests/testData/git-import/serverless-func-repo/contents.json new file mode 100644 index 000000000000..a7e646eb8667 --- /dev/null +++ b/frontend/packages/dev-console/integration-tests/testData/git-import/serverless-func-repo/contents.json @@ -0,0 +1,114 @@ +[ + { + "name": ".gitignore", + "path": ".gitignore", + "sha": "3abd5fdff11e295a0d72346ac99fe7034da1c6cb", + "size": 126, + "url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/contents/.gitignore?ref=master", + "html_url": "https://github.com/Lucifergene/serverless-func-repo/blob/master/.gitignore", + "git_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/git/blobs/3abd5fdff11e295a0d72346ac99fe7034da1c6cb", + "download_url": "https://raw.githubusercontent.com/Lucifergene/serverless-func-repo/master/.gitignore", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/Lucifergene/serverless-func-repo/contents/.gitignore?ref=master", + "git": "https://api.github.com/repos/Lucifergene/serverless-func-repo/git/blobs/3abd5fdff11e295a0d72346ac99fe7034da1c6cb", + "html": "https://github.com/Lucifergene/serverless-func-repo/blob/master/.gitignore" + } + }, + { + "name": "README.md", + "path": "README.md", + "sha": "3ecedd17b45af0a59d4a52dd648eda8ba090047a", + "size": 2096, + "url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/contents/README.md?ref=master", + "html_url": "https://github.com/Lucifergene/serverless-func-repo/blob/master/README.md", + "git_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/git/blobs/3ecedd17b45af0a59d4a52dd648eda8ba090047a", + "download_url": "https://raw.githubusercontent.com/Lucifergene/serverless-func-repo/master/README.md", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/Lucifergene/serverless-func-repo/contents/README.md?ref=master", + "git": "https://api.github.com/repos/Lucifergene/serverless-func-repo/git/blobs/3ecedd17b45af0a59d4a52dd648eda8ba090047a", + "html": "https://github.com/Lucifergene/serverless-func-repo/blob/master/README.md" + } + }, + { + "name": "func.yaml", + "path": "func.yaml", + "sha": "9336f0c8f3b0f5c37a55dc7e4e063fa99bfa4a29", + "size": 612, + "url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/contents/func.yaml?ref=master", + "html_url": "https://github.com/Lucifergene/serverless-func-repo/blob/master/func.yaml", + "git_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/git/blobs/9336f0c8f3b0f5c37a55dc7e4e063fa99bfa4a29", + "download_url": "https://raw.githubusercontent.com/Lucifergene/serverless-func-repo/master/func.yaml", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/Lucifergene/serverless-func-repo/contents/func.yaml?ref=master", + "git": "https://api.github.com/repos/Lucifergene/serverless-func-repo/git/blobs/9336f0c8f3b0f5c37a55dc7e4e063fa99bfa4a29", + "html": "https://github.com/Lucifergene/serverless-func-repo/blob/master/func.yaml" + } + }, + { + "name": "index.js", + "path": "index.js", + "sha": "04c81441d0b3e3e39bee13343c4058956f4ee0e4", + "size": 1463, + "url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/contents/index.js?ref=master", + "html_url": "https://github.com/Lucifergene/serverless-func-repo/blob/master/index.js", + "git_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/git/blobs/04c81441d0b3e3e39bee13343c4058956f4ee0e4", + "download_url": "https://raw.githubusercontent.com/Lucifergene/serverless-func-repo/master/index.js", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/Lucifergene/serverless-func-repo/contents/index.js?ref=master", + "git": "https://api.github.com/repos/Lucifergene/serverless-func-repo/git/blobs/04c81441d0b3e3e39bee13343c4058956f4ee0e4", + "html": "https://github.com/Lucifergene/serverless-func-repo/blob/master/index.js" + } + }, + { + "name": "package-lock.json", + "path": "package-lock.json", + "sha": "14391b4480f8919aa6cedfe7e92585eb55259d8a", + "size": 151831, + "url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/contents/package-lock.json?ref=master", + "html_url": "https://github.com/Lucifergene/serverless-func-repo/blob/master/package-lock.json", + "git_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/git/blobs/14391b4480f8919aa6cedfe7e92585eb55259d8a", + "download_url": "https://raw.githubusercontent.com/Lucifergene/serverless-func-repo/master/package-lock.json", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/Lucifergene/serverless-func-repo/contents/package-lock.json?ref=master", + "git": "https://api.github.com/repos/Lucifergene/serverless-func-repo/git/blobs/14391b4480f8919aa6cedfe7e92585eb55259d8a", + "html": "https://github.com/Lucifergene/serverless-func-repo/blob/master/package-lock.json" + } + }, + { + "name": "package.json", + "path": "package.json", + "sha": "2806b7a4ce0a7caf6f1e3d9c0a833c81db97f7eb", + "size": 565, + "url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/contents/package.json?ref=master", + "html_url": "https://github.com/Lucifergene/serverless-func-repo/blob/master/package.json", + "git_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/git/blobs/2806b7a4ce0a7caf6f1e3d9c0a833c81db97f7eb", + "download_url": "https://raw.githubusercontent.com/Lucifergene/serverless-func-repo/master/package.json", + "type": "file", + "_links": { + "self": "https://api.github.com/repos/Lucifergene/serverless-func-repo/contents/package.json?ref=master", + "git": "https://api.github.com/repos/Lucifergene/serverless-func-repo/git/blobs/2806b7a4ce0a7caf6f1e3d9c0a833c81db97f7eb", + "html": "https://github.com/Lucifergene/serverless-func-repo/blob/master/package.json" + } + }, + { + "name": "test", + "path": "test", + "sha": "9cea2aab5cb7d30f925060499367172b566d0842", + "size": 0, + "url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/contents/test?ref=master", + "html_url": "https://github.com/Lucifergene/serverless-func-repo/tree/master/test", + "git_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/git/trees/9cea2aab5cb7d30f925060499367172b566d0842", + "download_url": null, + "type": "dir", + "_links": { + "self": "https://api.github.com/repos/Lucifergene/serverless-func-repo/contents/test?ref=master", + "git": "https://api.github.com/repos/Lucifergene/serverless-func-repo/git/trees/9cea2aab5cb7d30f925060499367172b566d0842", + "html": "https://github.com/Lucifergene/serverless-func-repo/tree/master/test" + } + } + ] diff --git a/frontend/packages/dev-console/integration-tests/testData/git-import/serverless-func-repo/func.json b/frontend/packages/dev-console/integration-tests/testData/git-import/serverless-func-repo/func.json new file mode 100644 index 000000000000..c1c22112d99c --- /dev/null +++ b/frontend/packages/dev-console/integration-tests/testData/git-import/serverless-func-repo/func.json @@ -0,0 +1,18 @@ +{ + "name": "func.yaml", + "path": "func.yaml", + "sha": "9336f0c8f3b0f5c37a55dc7e4e063fa99bfa4a29", + "size": 612, + "url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/contents/func.yaml?ref=master", + "html_url": "https://github.com/Lucifergene/serverless-func-repo/blob/master/func.yaml", + "git_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/git/blobs/9336f0c8f3b0f5c37a55dc7e4e063fa99bfa4a29", + "download_url": "https://raw.githubusercontent.com/Lucifergene/serverless-func-repo/master/func.yaml", + "type": "file", + "content": "c3BlY1ZlcnNpb246IDAuMzQuMApuYW1lOiBoZWxsby1mdW5jLW5vZGUKcnVu\ndGltZTogbm9kZQpyZWdpc3RyeTogcXVheS5pby92aXJhal8xCmltYWdlOiBx\ndWF5LmlvL3ZpcmFqXzEvaGVsbG8tZnVuYy1ub2RlOmxhdGVzdAppbWFnZURp\nZ2VzdDogc2hhMjU2OmNiOTFjNmY4YThhODk3YTE0MjMxMjg4YjkwYWYzNWVm\nYTAwZmRhMjRjMzk5ZWQ5M2FmZGRlNThiYmNkOWI0Y2EKY3JlYXRlZDogMjAy\nMi0xMS0xNlQxNTozODozOC41MDIyNzUyNDQrMDU6MzAKaW52b2NhdGlvbjoK\nICBmb3JtYXQ6IGh0dHAKYnVpbGQ6CiAgYnVpbGRwYWNrczogW10KICBidWls\nZGVyOiBzMmkKICBidWlsZEVudnM6IAogIC0gbmFtZTogTVlfQlVJTERfS0VZ\nCiAgICB2YWx1ZTogdGVzdHMKcnVuOgogIHZvbHVtZXM6IFtdCiAgZW52czoK\nICAtIG5hbWU6IE1ZX0FQSV9LRVkKICAgIHZhbHVlOiAne3sgZW52OkFQSV9L\nRVkgfX0nCmRlcGxveToKICBuYW1lc3BhY2U6IHZpcmFqCiAgYW5ub3RhdGlv\nbnM6IHt9CiAgb3B0aW9uczoge30KICBsYWJlbHM6IFtdCiAgaGVhbHRoRW5k\ncG9pbnRzOgogICAgbGl2ZW5lc3M6IC9oZWFsdGgvbGl2ZW5lc3MKICAgIHJl\nYWRpbmVzczogL2hlYWx0aC9yZWFkaW5lc3MK\n", + "encoding": "base64", + "_links": { + "self": "https://api.github.com/repos/Lucifergene/serverless-func-repo/contents/func.yaml?ref=master", + "git": "https://api.github.com/repos/Lucifergene/serverless-func-repo/git/blobs/9336f0c8f3b0f5c37a55dc7e4e063fa99bfa4a29", + "html": "https://github.com/Lucifergene/serverless-func-repo/blob/master/func.yaml" + } +} \ No newline at end of file diff --git a/frontend/packages/dev-console/integration-tests/testData/git-import/serverless-func-repo/package.json b/frontend/packages/dev-console/integration-tests/testData/git-import/serverless-func-repo/package.json new file mode 100644 index 000000000000..0361fd3fedfd --- /dev/null +++ b/frontend/packages/dev-console/integration-tests/testData/git-import/serverless-func-repo/package.json @@ -0,0 +1,18 @@ +{ + "name": "package.json", + "path": "package.json", + "sha": "2806b7a4ce0a7caf6f1e3d9c0a833c81db97f7eb", + "size": 565, + "url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/contents/package.json?ref=master", + "html_url": "https://github.com/Lucifergene/serverless-func-repo/blob/master/package.json", + "git_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/git/blobs/2806b7a4ce0a7caf6f1e3d9c0a833c81db97f7eb", + "download_url": "https://raw.githubusercontent.com/Lucifergene/serverless-func-repo/master/package.json", + "type": "file", + "content": "ewogICJuYW1lIjogImh0dHAtaGFuZGxlciIsCiAgInZlcnNpb24iOiAiMC4x\nLjAiLAogICJkZXNjcmlwdGlvbiI6ICJBIGZ1bmN0aW9uIHdoaWNoIHJlc3Bv\nbmRzIHRvIEhUVFAgcmVxdWVzdHMiLAogICJtYWluIjogImluZGV4LmpzIiwK\nICAic2NyaXB0cyI6IHsKICAgICJ0ZXN0IjogIm5vZGUgdGVzdC91bml0Lmpz\nICYmIG5vZGUgdGVzdC9pbnRlZ3JhdGlvbi5qcyIsCiAgICAic3RhcnQiOiAi\nZmFhcy1qcy1ydW50aW1lIC4vaW5kZXguanMiLAogICAgImRlYnVnIjogIm5v\nZGVtb24gLS1pbnNwZWN0IC4vbm9kZV9tb2R1bGVzL2ZhYXMtanMtcnVudGlt\nZS9iaW4vY2xpLmpzIC4vaW5kZXguanMiCiAgfSwKICAia2V5d29yZHMiOiBb\nXSwKICAiYXV0aG9yIjogIiIsCiAgImxpY2Vuc2UiOiAiQXBhY2hlLTIuMCIs\nCiAgImRlcGVuZGVuY2llcyI6IHsKICAgICJmYWFzLWpzLXJ1bnRpbWUiOiAi\nXjAuOS4wIgogIH0sCiAgImRldkRlcGVuZGVuY2llcyI6IHsKICAgICJub2Rl\nbW9uIjogIl4yLjAuNCIsCiAgICAic3VwZXJ0ZXN0IjogIl40LjAuMiIsCiAg\nICAidGFwZSI6ICJeNS4wLjEiCiAgfQp9Cg==\n", + "encoding": "base64", + "_links": { + "self": "https://api.github.com/repos/Lucifergene/serverless-func-repo/contents/package.json?ref=master", + "git": "https://api.github.com/repos/Lucifergene/serverless-func-repo/git/blobs/2806b7a4ce0a7caf6f1e3d9c0a833c81db97f7eb", + "html": "https://github.com/Lucifergene/serverless-func-repo/blob/master/package.json" + } +} \ No newline at end of file diff --git a/frontend/packages/dev-console/integration-tests/testData/git-import/serverless-func-repo/repo.json b/frontend/packages/dev-console/integration-tests/testData/git-import/serverless-func-repo/repo.json new file mode 100644 index 000000000000..728449104a59 --- /dev/null +++ b/frontend/packages/dev-console/integration-tests/testData/git-import/serverless-func-repo/repo.json @@ -0,0 +1,105 @@ +{ + "id": 590432017, + "node_id": "R_kgDOIzFHEQ", + "name": "serverless-func-repo", + "full_name": "Lucifergene/serverless-func-repo", + "private": false, + "owner": { + "login": "Lucifergene", + "id": 47265560, + "node_id": "MDQ6VXNlcjQ3MjY1NTYw", + "avatar_url": "https://avatars.githubusercontent.com/u/47265560?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Lucifergene", + "html_url": "https://github.com/Lucifergene", + "followers_url": "https://api.github.com/users/Lucifergene/followers", + "following_url": "https://api.github.com/users/Lucifergene/following{/other_user}", + "gists_url": "https://api.github.com/users/Lucifergene/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Lucifergene/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Lucifergene/subscriptions", + "organizations_url": "https://api.github.com/users/Lucifergene/orgs", + "repos_url": "https://api.github.com/users/Lucifergene/repos", + "events_url": "https://api.github.com/users/Lucifergene/events{/privacy}", + "received_events_url": "https://api.github.com/users/Lucifergene/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/Lucifergene/serverless-func-repo", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/Lucifergene/serverless-func-repo", + "forks_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/forks", + "keys_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/teams", + "hooks_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/hooks", + "issue_events_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/issues/events{/number}", + "events_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/events", + "assignees_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/assignees{/user}", + "branches_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/branches{/branch}", + "tags_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/tags", + "blobs_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/languages", + "stargazers_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/stargazers", + "contributors_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/contributors", + "subscribers_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/subscribers", + "subscription_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/subscription", + "commits_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/contents/{+path}", + "compare_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/merges", + "archive_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/downloads", + "issues_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/issues{/number}", + "pulls_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/labels{/name}", + "releases_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/releases{/id}", + "deployments_url": "https://api.github.com/repos/Lucifergene/serverless-func-repo/deployments", + "created_at": "2023-01-18T12:03:32Z", + "updated_at": "2023-01-18T12:03:55Z", + "pushed_at": "2023-01-18T12:03:46Z", + "git_url": "git://github.com/Lucifergene/serverless-func-repo.git", + "ssh_url": "git@github.com:Lucifergene/serverless-func-repo.git", + "clone_url": "https://github.com/Lucifergene/serverless-func-repo.git", + "svn_url": "https://github.com/Lucifergene/serverless-func-repo", + "homepage": null, + "size": 70, + "stargazers_count": 0, + "watchers_count": 0, + "language": "JavaScript", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "has_discussions": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [ + + ], + "visibility": "public", + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "master", + "temp_clone_token": null, + "network_count": 0, + "subscribers_count": 2 + } diff --git a/frontend/packages/knative-plugin/integration-tests/support/step-definitions/serverless/test-serverless-function.ts b/frontend/packages/knative-plugin/integration-tests/support/step-definitions/serverless/test-serverless-function.ts index 1d3919eb2384..7d643735cdc0 100644 --- a/frontend/packages/knative-plugin/integration-tests/support/step-definitions/serverless/test-serverless-function.ts +++ b/frontend/packages/knative-plugin/integration-tests/support/step-definitions/serverless/test-serverless-function.ts @@ -10,7 +10,7 @@ When( cy.get(topologyPO.quickSearchPO.listView).click(); // eslint-disable-next-line cypress/no-unnecessary-waiting cy.wait(5000); /* Revision taking more time to appear than the default timeout */ - cy.get(`[id$=${workloadName}]`).should('be.visible'); + cy.get(`[id$=${workloadName}]`, { timeout: 150000 }).should('be.visible'); cy.get(topologyPO.quickSearchPO.graphView).click(); }, ); @@ -59,7 +59,7 @@ When( ); When('user clicks the {string} Button', (button: string) => { - cy.byTestID(`${button.toLowerCase()}-action`).should('be.visible').click(); + cy.byTestID(`${button.toLowerCase()}-action`).eq(0).should('be.visible').click(); }); Then('user is able to see a Success Alert', () => {