{"action":"created","comment":{"url":"https://api.github.com/repos/rancher/rancher/pulls/comments/192232066","pull_request_review_id":124969565,"id":192232066,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MjIzMjA2Ng==","diff_hunk":"@@ -17,3 +25,67 @@ func (r *Store) ByID(apiContext *types.APIContext, schema *types.Schema, id stri\n \t}\n \treturn r.Store.ByID(apiContext, schema, id)\n }\n+\n+func (r *Store) Create(apiContext *types.APIContext, schema *types.Schema, data map[string]interface{}) (map[string]interface{}, error) {\n+\n+\tname, ok := data[\"name\"].(string)\n+\tif !ok {\n+\t\treturn nil, httperror.NewFieldAPIError(httperror.MissingRequired, \"Cluster name\", \"\")\n+\t}\n+\n+\tr.mu.Lock()\n+\tdefer r.mu.Unlock()\n+\n+\tvar clusters []managementv3.Cluster","path":"pkg/api/store/cluster/cluster_store.go","position":36,"original_position":36,"commit_id":"869e6b3e8b521bad55faff78625b7b9e0f3d54c3","original_commit_id":"869e6b3e8b521bad55faff78625b7b9e0f3d54c3","user":{"login":"alena1108","id":1562176,"node_id":"MDQ6VXNlcjE1NjIxNzY=","avatar_url":"https://avatars0.githubusercontent.com/u/1562176?v=4","gravatar_id":"","url":"https://api.github.com/users/alena1108","html_url":"https://github.com/alena1108","followers_url":"https://api.github.com/users/alena1108/followers","following_url":"https://api.github.com/users/alena1108/following{/other_user}","gists_url":"https://api.github.com/users/alena1108/gists{/gist_id}","starred_url":"https://api.github.com/users/alena1108/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alena1108/subscriptions","organizations_url":"https://api.github.com/users/alena1108/orgs","repos_url":"https://api.github.com/users/alena1108/repos","events_url":"https://api.github.com/users/alena1108/events{/privacy}","received_events_url":"https://api.github.com/users/alena1108/received_events","type":"User","site_admin":false},"body":"we should perhaps extract the code into common method. From line 39 to line 51","created_at":"2018-05-31T20:46:43Z","updated_at":"2018-05-31T20:46:43Z","html_url":"https://github.com/rancher/rancher/pull/13798#discussion_r192232066","pull_request_url":"https://api.github.com/repos/rancher/rancher/pulls/13798","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/rancher/rancher/pulls/comments/192232066"},"html":{"href":"https://github.com/rancher/rancher/pull/13798#discussion_r192232066"},"pull_request":{"href":"https://api.github.com/repos/rancher/rancher/pulls/13798"}}},"pull_request":{"url":"https://api.github.com/repos/rancher/rancher/pulls/13798","id":191834074,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxODM0MDc0","html_url":"https://github.com/rancher/rancher/pull/13798","diff_url":"https://github.com/rancher/rancher/pull/13798.diff","patch_url":"https://github.com/rancher/rancher/pull/13798.patch","issue_url":"https://api.github.com/repos/rancher/rancher/issues/13798","number":13798,"state":"open","locked":false,"title":"Checks to ensure Cluster name unique and required","user":{"login":"prachidamle","id":1470602,"node_id":"MDQ6VXNlcjE0NzA2MDI=","avatar_url":"https://avatars2.githubusercontent.com/u/1470602?v=4","gravatar_id":"","url":"https://api.github.com/users/prachidamle","html_url":"https://github.com/prachidamle","followers_url":"https://api.github.com/users/prachidamle/followers","following_url":"https://api.github.com/users/prachidamle/following{/other_user}","gists_url":"https://api.github.com/users/prachidamle/gists{/gist_id}","starred_url":"https://api.github.com/users/prachidamle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prachidamle/subscriptions","organizations_url":"https://api.github.com/users/prachidamle/orgs","repos_url":"https://api.github.com/users/prachidamle/repos","events_url":"https://api.github.com/users/prachidamle/events{/privacy}","received_events_url":"https://api.github.com/users/prachidamle/received_events","type":"User","site_admin":false},"body":"https://github.com/rancher/rancher/issues/13075","created_at":"2018-05-31T18:17:06Z","updated_at":"2018-05-31T20:46:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e9434238dcdf6d156f0f51707b41f792be2d9c7e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rancher/rancher/pulls/13798/commits","review_comments_url":"https://api.github.com/repos/rancher/rancher/pulls/13798/comments","review_comment_url":"https://api.github.com/repos/rancher/rancher/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rancher/rancher/issues/13798/comments","statuses_url":"https://api.github.com/repos/rancher/rancher/statuses/869e6b3e8b521bad55faff78625b7b9e0f3d54c3","head":{"label":"prachidamle:cluster_name_unique","ref":"cluster_name_unique","sha":"869e6b3e8b521bad55faff78625b7b9e0f3d54c3","user":{"login":"prachidamle","id":1470602,"node_id":"MDQ6VXNlcjE0NzA2MDI=","avatar_url":"https://avatars2.githubusercontent.com/u/1470602?v=4","gravatar_id":"","url":"https://api.github.com/users/prachidamle","html_url":"https://github.com/prachidamle","followers_url":"https://api.github.com/users/prachidamle/followers","following_url":"https://api.github.com/users/prachidamle/following{/other_user}","gists_url":"https://api.github.com/users/prachidamle/gists{/gist_id}","starred_url":"https://api.github.com/users/prachidamle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prachidamle/subscriptions","organizations_url":"https://api.github.com/users/prachidamle/orgs","repos_url":"https://api.github.com/users/prachidamle/repos","events_url":"https://api.github.com/users/prachidamle/events{/privacy}","received_events_url":"https://api.github.com/users/prachidamle/received_events","type":"User","site_admin":false},"repo":{"id":119603901,"node_id":"MDEwOlJlcG9zaXRvcnkxMTk2MDM5MDE=","name":"rancher","full_name":"prachidamle/rancher","owner":{"login":"prachidamle","id":1470602,"node_id":"MDQ6VXNlcjE0NzA2MDI=","avatar_url":"https://avatars2.githubusercontent.com/u/1470602?v=4","gravatar_id":"","url":"https://api.github.com/users/prachidamle","html_url":"https://github.com/prachidamle","followers_url":"https://api.github.com/users/prachidamle/followers","following_url":"https://api.github.com/users/prachidamle/following{/other_user}","gists_url":"https://api.github.com/users/prachidamle/gists{/gist_id}","starred_url":"https://api.github.com/users/prachidamle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prachidamle/subscriptions","organizations_url":"https://api.github.com/users/prachidamle/orgs","repos_url":"https://api.github.com/users/prachidamle/repos","events_url":"https://api.github.com/users/prachidamle/events{/privacy}","received_events_url":"https://api.github.com/users/prachidamle/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/prachidamle/rancher","description":"Complete container management platform","fork":true,"url":"https://api.github.com/repos/prachidamle/rancher","forks_url":"https://api.github.com/repos/prachidamle/rancher/forks","keys_url":"https://api.github.com/repos/prachidamle/rancher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prachidamle/rancher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prachidamle/rancher/teams","hooks_url":"https://api.github.com/repos/prachidamle/rancher/hooks","issue_events_url":"https://api.github.com/repos/prachidamle/rancher/issues/events{/number}","events_url":"https://api.github.com/repos/prachidamle/rancher/events","assignees_url":"https://api.github.com/repos/prachidamle/rancher/assignees{/user}","branches_url":"https://api.github.com/repos/prachidamle/rancher/branches{/branch}","tags_url":"https://api.github.com/repos/prachidamle/rancher/tags","blobs_url":"https://api.github.com/repos/prachidamle/rancher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prachidamle/rancher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prachidamle/rancher/git/refs{/sha}","trees_url":"https://api.github.com/repos/prachidamle/rancher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prachidamle/rancher/statuses/{sha}","languages_url":"https://api.github.com/repos/prachidamle/rancher/languages","stargazers_url":"https://api.github.com/repos/prachidamle/rancher/stargazers","contributors_url":"https://api.github.com/repos/prachidamle/rancher/contributors","subscribers_url":"https://api.github.com/repos/prachidamle/rancher/subscribers","subscription_url":"https://api.github.com/repos/prachidamle/rancher/subscription","commits_url":"https://api.github.com/repos/prachidamle/rancher/commits{/sha}","git_commits_url":"https://api.github.com/repos/prachidamle/rancher/git/commits{/sha}","comments_url":"https://api.github.com/repos/prachidamle/rancher/comments{/number}","issue_comment_url":"https://api.github.com/repos/prachidamle/rancher/issues/comments{/number}","contents_url":"https://api.github.com/repos/prachidamle/rancher/contents/{+path}","compare_url":"https://api.github.com/repos/prachidamle/rancher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prachidamle/rancher/merges","archive_url":"https://api.github.com/repos/prachidamle/rancher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prachidamle/rancher/downloads","issues_url":"https://api.github.com/repos/prachidamle/rancher/issues{/number}","pulls_url":"https://api.github.com/repos/prachidamle/rancher/pulls{/number}","milestones_url":"https://api.github.com/repos/prachidamle/rancher/milestones{/number}","notifications_url":"https://api.github.com/repos/prachidamle/rancher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prachidamle/rancher/labels{/name}","releases_url":"https://api.github.com/repos/prachidamle/rancher/releases{/id}","deployments_url":"https://api.github.com/repos/prachidamle/rancher/deployments","created_at":"2018-01-30T22:42:55Z","updated_at":"2018-01-30T22:42:59Z","pushed_at":"2018-05-31T20:41:59Z","git_url":"git://github.com/prachidamle/rancher.git","ssh_url":"git@github.com:prachidamle/rancher.git","clone_url":"https://github.com/prachidamle/rancher.git","svn_url":"https://github.com/prachidamle/rancher","homepage":"http://rancher.com","size":33536,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rancher:master","ref":"master","sha":"e664ae48504ce6890f5367dee587c11797583c14","user":{"login":"rancher","id":9343010,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkzNDMwMTA=","avatar_url":"https://avatars3.githubusercontent.com/u/9343010?v=4","gravatar_id":"","url":"https://api.github.com/users/rancher","html_url":"https://github.com/rancher","followers_url":"https://api.github.com/users/rancher/followers","following_url":"https://api.github.com/users/rancher/following{/other_user}","gists_url":"https://api.github.com/users/rancher/gists{/gist_id}","starred_url":"https://api.github.com/users/rancher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rancher/subscriptions","organizations_url":"https://api.github.com/users/rancher/orgs","repos_url":"https://api.github.com/users/rancher/repos","events_url":"https://api.github.com/users/rancher/events{/privacy}","received_events_url":"https://api.github.com/users/rancher/received_events","type":"Organization","site_admin":false},"repo":{"id":26337322,"node_id":"MDEwOlJlcG9zaXRvcnkyNjMzNzMyMg==","name":"rancher","full_name":"rancher/rancher","owner":{"login":"rancher","id":9343010,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkzNDMwMTA=","avatar_url":"https://avatars3.githubusercontent.com/u/9343010?v=4","gravatar_id":"","url":"https://api.github.com/users/rancher","html_url":"https://github.com/rancher","followers_url":"https://api.github.com/users/rancher/followers","following_url":"https://api.github.com/users/rancher/following{/other_user}","gists_url":"https://api.github.com/users/rancher/gists{/gist_id}","starred_url":"https://api.github.com/users/rancher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rancher/subscriptions","organizations_url":"https://api.github.com/users/rancher/orgs","repos_url":"https://api.github.com/users/rancher/repos","events_url":"https://api.github.com/users/rancher/events{/privacy}","received_events_url":"https://api.github.com/users/rancher/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rancher/rancher","description":"Complete container management platform","fork":false,"url":"https://api.github.com/repos/rancher/rancher","forks_url":"https://api.github.com/repos/rancher/rancher/forks","keys_url":"https://api.github.com/repos/rancher/rancher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rancher/rancher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rancher/rancher/teams","hooks_url":"https://api.github.com/repos/rancher/rancher/hooks","issue_events_url":"https://api.github.com/repos/rancher/rancher/issues/events{/number}","events_url":"https://api.github.com/repos/rancher/rancher/events","assignees_url":"https://api.github.com/repos/rancher/rancher/assignees{/user}","branches_url":"https://api.github.com/repos/rancher/rancher/branches{/branch}","tags_url":"https://api.github.com/repos/rancher/rancher/tags","blobs_url":"https://api.github.com/repos/rancher/rancher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rancher/rancher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rancher/rancher/git/refs{/sha}","trees_url":"https://api.github.com/repos/rancher/rancher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rancher/rancher/statuses/{sha}","languages_url":"https://api.github.com/repos/rancher/rancher/languages","stargazers_url":"https://api.github.com/repos/rancher/rancher/stargazers","contributors_url":"https://api.github.com/repos/rancher/rancher/contributors","subscribers_url":"https://api.github.com/repos/rancher/rancher/subscribers","subscription_url":"https://api.github.com/repos/rancher/rancher/subscription","commits_url":"https://api.github.com/repos/rancher/rancher/commits{/sha}","git_commits_url":"https://api.github.com/repos/rancher/rancher/git/commits{/sha}","comments_url":"https://api.github.com/repos/rancher/rancher/comments{/number}","issue_comment_url":"https://api.github.com/repos/rancher/rancher/issues/comments{/number}","contents_url":"https://api.github.com/repos/rancher/rancher/contents/{+path}","compare_url":"https://api.github.com/repos/rancher/rancher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rancher/rancher/merges","archive_url":"https://api.github.com/repos/rancher/rancher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rancher/rancher/downloads","issues_url":"https://api.github.com/repos/rancher/rancher/issues{/number}","pulls_url":"https://api.github.com/repos/rancher/rancher/pulls{/number}","milestones_url":"https://api.github.com/repos/rancher/rancher/milestones{/number}","notifications_url":"https://api.github.com/repos/rancher/rancher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rancher/rancher/labels{/name}","releases_url":"https://api.github.com/repos/rancher/rancher/releases{/id}","deployments_url":"https://api.github.com/repos/rancher/rancher/deployments","created_at":"2014-11-07T20:49:31Z","updated_at":"2018-05-31T19:50:35Z","pushed_at":"2018-05-31T20:42:02Z","git_url":"git://github.com/rancher/rancher.git","ssh_url":"git@github.com:rancher/rancher.git","clone_url":"https://github.com/rancher/rancher.git","svn_url":"https://github.com/rancher/rancher","homepage":"http://rancher.com","size":33919,"stargazers_count":8636,"watchers_count":8636,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":866,"mirror_url":null,"archived":false,"open_issues_count":2110,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":866,"open_issues":2110,"watchers":8636,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rancher/rancher/pulls/13798"},"html":{"href":"https://github.com/rancher/rancher/pull/13798"},"issue":{"href":"https://api.github.com/repos/rancher/rancher/issues/13798"},"comments":{"href":"https://api.github.com/repos/rancher/rancher/issues/13798/comments"},"review_comments":{"href":"https://api.github.com/repos/rancher/rancher/pulls/13798/comments"},"review_comment":{"href":"https://api.github.com/repos/rancher/rancher/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rancher/rancher/pulls/13798/commits"},"statuses":{"href":"https://api.github.com/repos/rancher/rancher/statuses/869e6b3e8b521bad55faff78625b7b9e0f3d54c3"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"alena1108"}}