{"action":"created","comment":{"url":"https://api.github.com/repos/koding/koding/pulls/comments/110241365","pull_request_review_id":31401351,"id":110241365,"diff_hunk":"@@ -14,38 +14,36 @@ const GroupDataColl = \"jGroupDatas\"\n var errPathNotSet = errors.New(\"path is not set\")\n \n // GetGroupData fetches the group data from db.\n-func GetGroupData(slug string) (*models.GroupData, error) {\n-\tgd := new(models.GroupData)\n-\n+func GetGroupData(slug string, gd interface{}) error {\n \tquery := func(c *mgo.Collection) error {\n-\t\treturn c.Find(bson.M{\"slug\": slug}).One(&gd)\n+\t\treturn c.Find(bson.M{\"slug\": slug}).One(gd)\n \t}\n \n-\treturn gd, Mongo.Run(GroupDataColl, query)\n+\treturn Mongo.Run(GroupDataColl, query)\n }\n \n // GetGroupDataPath fetches the group data from db but only the given path.\n-func GetGroupDataPath(slug, path string) (*models.GroupData, error) {\n+func GetGroupDataPath(slug, path string, gd interface{}) error {\n \tif path == \"\" {\n-\t\treturn nil, errPathNotSet\n+\t\treturn errPathNotSet\n \t}\n \n-\tgd := new(models.GroupData)\n \tquery := func(c *mgo.Collection) error {\n-\t\treturn c.Find(bson.M{\"slug\": slug}).Select(bson.M{\"data.\" + path: 1}).One(&gd)\n+\t\treturn c.Find(bson.M{\"slug\": slug}).Select(bson.M{\"payload.\" + path: 1}).One(gd)\n \t}\n \n-\treturn gd, Mongo.Run(GroupDataColl, query)\n+\treturn Mongo.Run(GroupDataColl, query)\n }\n \n // HasGroupDataPath checks if the given path has data or not.\n func HasGroupDataPath(slug, path string) (bool, error) {\n-\tgdp, err := GetGroupDataPath(slug, path)\n+\tgdp := &models.GroupData{}\n+\terr := GetGroupDataPath(slug, path, &gdp)","path":"go/src/koding/db/mongodb/modelhelper/groupdata.go","position":39,"original_position":39,"commit_id":"35c37988bac3b4b428734fa6bd483cdda32c4d35","original_commit_id":"35c37988bac3b4b428734fa6bd483cdda32c4d35","user":{"login":"rjeczalik","id":1162017,"avatar_url":"https://avatars0.githubusercontent.com/u/1162017?v=3","gravatar_id":"","url":"https://api.github.com/users/rjeczalik","html_url":"https://github.com/rjeczalik","followers_url":"https://api.github.com/users/rjeczalik/followers","following_url":"https://api.github.com/users/rjeczalik/following{/other_user}","gists_url":"https://api.github.com/users/rjeczalik/gists{/gist_id}","starred_url":"https://api.github.com/users/rjeczalik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjeczalik/subscriptions","organizations_url":"https://api.github.com/users/rjeczalik/orgs","repos_url":"https://api.github.com/users/rjeczalik/repos","events_url":"https://api.github.com/users/rjeczalik/events{/privacy}","received_events_url":"https://api.github.com/users/rjeczalik/received_events","type":"User","site_admin":false},"body":"gdp is already a pointer\r\n\r\n```\r\nerr := GetGroupDataPath(slug, path, gdp)\r\n```","created_at":"2017-04-06T18:59:01Z","updated_at":"2017-04-06T18:59:01Z","html_url":"https://github.com/koding/koding/pull/10927#discussion_r110241365","pull_request_url":"https://api.github.com/repos/koding/koding/pulls/10927","_links":{"self":{"href":"https://api.github.com/repos/koding/koding/pulls/comments/110241365"},"html":{"href":"https://github.com/koding/koding/pull/10927#discussion_r110241365"},"pull_request":{"href":"https://api.github.com/repos/koding/koding/pulls/10927"}}},"pull_request":{"url":"https://api.github.com/repos/koding/koding/pulls/10927","id":113723071,"html_url":"https://github.com/koding/koding/pull/10927","diff_url":"https://github.com/koding/koding/pull/10927.diff","patch_url":"https://github.com/koding/koding/pull/10927.patch","issue_url":"https://api.github.com/repos/koding/koding/issues/10927","number":10927,"state":"open","locked":false,"title":"Use JGroupData for countly credentials","user":{"login":"cihangir","id":879660,"avatar_url":"https://avatars1.githubusercontent.com/u/879660?v=3","gravatar_id":"","url":"https://api.github.com/users/cihangir","html_url":"https://github.com/cihangir","followers_url":"https://api.github.com/users/cihangir/followers","following_url":"https://api.github.com/users/cihangir/following{/other_user}","gists_url":"https://api.github.com/users/cihangir/gists{/gist_id}","starred_url":"https://api.github.com/users/cihangir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cihangir/subscriptions","organizations_url":"https://api.github.com/users/cihangir/orgs","repos_url":"https://api.github.com/users/cihangir/repos","events_url":"https://api.github.com/users/cihangir/events{/privacy}","received_events_url":"https://api.github.com/users/cihangir/received_events","type":"User","site_admin":false},"body":"This is not a backward compatible change, we need to run migrations during switch operation.","created_at":"2017-03-31T20:07:44Z","updated_at":"2017-04-06T18:59:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"120d619bffc7cb707a0d3a94652f5367d145bac8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/koding/koding/pulls/10927/commits","review_comments_url":"https://api.github.com/repos/koding/koding/pulls/10927/comments","review_comment_url":"https://api.github.com/repos/koding/koding/pulls/comments{/number}","comments_url":"https://api.github.com/repos/koding/koding/issues/10927/comments","statuses_url":"https://api.github.com/repos/koding/koding/statuses/35c37988bac3b4b428734fa6bd483cdda32c4d35","head":{"label":"koding:create_group_data","ref":"create_group_data","sha":"35c37988bac3b4b428734fa6bd483cdda32c4d35","user":{"login":"koding","id":1066754,"avatar_url":"https://avatars0.githubusercontent.com/u/1066754?v=3","gravatar_id":"","url":"https://api.github.com/users/koding","html_url":"https://github.com/koding","followers_url":"https://api.github.com/users/koding/followers","following_url":"https://api.github.com/users/koding/following{/other_user}","gists_url":"https://api.github.com/users/koding/gists{/gist_id}","starred_url":"https://api.github.com/users/koding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koding/subscriptions","organizations_url":"https://api.github.com/users/koding/orgs","repos_url":"https://api.github.com/users/koding/repos","events_url":"https://api.github.com/users/koding/events{/privacy}","received_events_url":"https://api.github.com/users/koding/received_events","type":"Organization","site_admin":false},"repo":{"id":21317360,"name":"koding","full_name":"koding/koding","owner":{"login":"koding","id":1066754,"avatar_url":"https://avatars0.githubusercontent.com/u/1066754?v=3","gravatar_id":"","url":"https://api.github.com/users/koding","html_url":"https://github.com/koding","followers_url":"https://api.github.com/users/koding/followers","following_url":"https://api.github.com/users/koding/following{/other_user}","gists_url":"https://api.github.com/users/koding/gists{/gist_id}","starred_url":"https://api.github.com/users/koding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koding/subscriptions","organizations_url":"https://api.github.com/users/koding/orgs","repos_url":"https://api.github.com/users/koding/repos","events_url":"https://api.github.com/users/koding/events{/privacy}","received_events_url":"https://api.github.com/users/koding/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/koding/koding","description":"The Simplest Way to Manage Your Entire Dev Infrastructure!","fork":false,"url":"https://api.github.com/repos/koding/koding","forks_url":"https://api.github.com/repos/koding/koding/forks","keys_url":"https://api.github.com/repos/koding/koding/keys{/key_id}","collaborators_url":"https://api.github.com/repos/koding/koding/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/koding/koding/teams","hooks_url":"https://api.github.com/repos/koding/koding/hooks","issue_events_url":"https://api.github.com/repos/koding/koding/issues/events{/number}","events_url":"https://api.github.com/repos/koding/koding/events","assignees_url":"https://api.github.com/repos/koding/koding/assignees{/user}","branches_url":"https://api.github.com/repos/koding/koding/branches{/branch}","tags_url":"https://api.github.com/repos/koding/koding/tags","blobs_url":"https://api.github.com/repos/koding/koding/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/koding/koding/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/koding/koding/git/refs{/sha}","trees_url":"https://api.github.com/repos/koding/koding/git/trees{/sha}","statuses_url":"https://api.github.com/repos/koding/koding/statuses/{sha}","languages_url":"https://api.github.com/repos/koding/koding/languages","stargazers_url":"https://api.github.com/repos/koding/koding/stargazers","contributors_url":"https://api.github.com/repos/koding/koding/contributors","subscribers_url":"https://api.github.com/repos/koding/koding/subscribers","subscription_url":"https://api.github.com/repos/koding/koding/subscription","commits_url":"https://api.github.com/repos/koding/koding/commits{/sha}","git_commits_url":"https://api.github.com/repos/koding/koding/git/commits{/sha}","comments_url":"https://api.github.com/repos/koding/koding/comments{/number}","issue_comment_url":"https://api.github.com/repos/koding/koding/issues/comments{/number}","contents_url":"https://api.github.com/repos/koding/koding/contents/{+path}","compare_url":"https://api.github.com/repos/koding/koding/compare/{base}...{head}","merges_url":"https://api.github.com/repos/koding/koding/merges","archive_url":"https://api.github.com/repos/koding/koding/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/koding/koding/downloads","issues_url":"https://api.github.com/repos/koding/koding/issues{/number}","pulls_url":"https://api.github.com/repos/koding/koding/pulls{/number}","milestones_url":"https://api.github.com/repos/koding/koding/milestones{/number}","notifications_url":"https://api.github.com/repos/koding/koding/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/koding/koding/labels{/name}","releases_url":"https://api.github.com/repos/koding/koding/releases{/id}","deployments_url":"https://api.github.com/repos/koding/koding/deployments","created_at":"2014-06-29T05:46:24Z","updated_at":"2017-04-03T08:10:25Z","pushed_at":"2017-04-06T18:44:54Z","git_url":"git://github.com/koding/koding.git","ssh_url":"git@github.com:koding/koding.git","clone_url":"https://github.com/koding/koding.git","svn_url":"https://github.com/koding/koding","homepage":"https://www.koding.com","size":835245,"stargazers_count":577,"watchers_count":577,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":87,"mirror_url":null,"open_issues_count":236,"forks":87,"open_issues":236,"watchers":577,"default_branch":"master"}},"base":{"label":"koding:master","ref":"master","sha":"a5bcdfbe3fc5e1688fc578cc115466df8f57ea89","user":{"login":"koding","id":1066754,"avatar_url":"https://avatars0.githubusercontent.com/u/1066754?v=3","gravatar_id":"","url":"https://api.github.com/users/koding","html_url":"https://github.com/koding","followers_url":"https://api.github.com/users/koding/followers","following_url":"https://api.github.com/users/koding/following{/other_user}","gists_url":"https://api.github.com/users/koding/gists{/gist_id}","starred_url":"https://api.github.com/users/koding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koding/subscriptions","organizations_url":"https://api.github.com/users/koding/orgs","repos_url":"https://api.github.com/users/koding/repos","events_url":"https://api.github.com/users/koding/events{/privacy}","received_events_url":"https://api.github.com/users/koding/received_events","type":"Organization","site_admin":false},"repo":{"id":21317360,"name":"koding","full_name":"koding/koding","owner":{"login":"koding","id":1066754,"avatar_url":"https://avatars0.githubusercontent.com/u/1066754?v=3","gravatar_id":"","url":"https://api.github.com/users/koding","html_url":"https://github.com/koding","followers_url":"https://api.github.com/users/koding/followers","following_url":"https://api.github.com/users/koding/following{/other_user}","gists_url":"https://api.github.com/users/koding/gists{/gist_id}","starred_url":"https://api.github.com/users/koding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koding/subscriptions","organizations_url":"https://api.github.com/users/koding/orgs","repos_url":"https://api.github.com/users/koding/repos","events_url":"https://api.github.com/users/koding/events{/privacy}","received_events_url":"https://api.github.com/users/koding/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/koding/koding","description":"The Simplest Way to Manage Your Entire Dev Infrastructure!","fork":false,"url":"https://api.github.com/repos/koding/koding","forks_url":"https://api.github.com/repos/koding/koding/forks","keys_url":"https://api.github.com/repos/koding/koding/keys{/key_id}","collaborators_url":"https://api.github.com/repos/koding/koding/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/koding/koding/teams","hooks_url":"https://api.github.com/repos/koding/koding/hooks","issue_events_url":"https://api.github.com/repos/koding/koding/issues/events{/number}","events_url":"https://api.github.com/repos/koding/koding/events","assignees_url":"https://api.github.com/repos/koding/koding/assignees{/user}","branches_url":"https://api.github.com/repos/koding/koding/branches{/branch}","tags_url":"https://api.github.com/repos/koding/koding/tags","blobs_url":"https://api.github.com/repos/koding/koding/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/koding/koding/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/koding/koding/git/refs{/sha}","trees_url":"https://api.github.com/repos/koding/koding/git/trees{/sha}","statuses_url":"https://api.github.com/repos/koding/koding/statuses/{sha}","languages_url":"https://api.github.com/repos/koding/koding/languages","stargazers_url":"https://api.github.com/repos/koding/koding/stargazers","contributors_url":"https://api.github.com/repos/koding/koding/contributors","subscribers_url":"https://api.github.com/repos/koding/koding/subscribers","subscription_url":"https://api.github.com/repos/koding/koding/subscription","commits_url":"https://api.github.com/repos/koding/koding/commits{/sha}","git_commits_url":"https://api.github.com/repos/koding/koding/git/commits{/sha}","comments_url":"https://api.github.com/repos/koding/koding/comments{/number}","issue_comment_url":"https://api.github.com/repos/koding/koding/issues/comments{/number}","contents_url":"https://api.github.com/repos/koding/koding/contents/{+path}","compare_url":"https://api.github.com/repos/koding/koding/compare/{base}...{head}","merges_url":"https://api.github.com/repos/koding/koding/merges","archive_url":"https://api.github.com/repos/koding/koding/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/koding/koding/downloads","issues_url":"https://api.github.com/repos/koding/koding/issues{/number}","pulls_url":"https://api.github.com/repos/koding/koding/pulls{/number}","milestones_url":"https://api.github.com/repos/koding/koding/milestones{/number}","notifications_url":"https://api.github.com/repos/koding/koding/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/koding/koding/labels{/name}","releases_url":"https://api.github.com/repos/koding/koding/releases{/id}","deployments_url":"https://api.github.com/repos/koding/koding/deployments","created_at":"2014-06-29T05:46:24Z","updated_at":"2017-04-03T08:10:25Z","pushed_at":"2017-04-06T18:44:54Z","git_url":"git://github.com/koding/koding.git","ssh_url":"git@github.com:koding/koding.git","clone_url":"https://github.com/koding/koding.git","svn_url":"https://github.com/koding/koding","homepage":"https://www.koding.com","size":835245,"stargazers_count":577,"watchers_count":577,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":87,"mirror_url":null,"open_issues_count":236,"forks":87,"open_issues":236,"watchers":577,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/koding/koding/pulls/10927"},"html":{"href":"https://github.com/koding/koding/pull/10927"},"issue":{"href":"https://api.github.com/repos/koding/koding/issues/10927"},"comments":{"href":"https://api.github.com/repos/koding/koding/issues/10927/comments"},"review_comments":{"href":"https://api.github.com/repos/koding/koding/pulls/10927/comments"},"review_comment":{"href":"https://api.github.com/repos/koding/koding/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/koding/koding/pulls/10927/commits"},"statuses":{"href":"https://api.github.com/repos/koding/koding/statuses/35c37988bac3b4b428734fa6bd483cdda32c4d35"}}}}
{"actor":{"display_login":"rjeczalik"}}