{"action":"created","comment":{"url":"https://api.github.com/repos/aerogear/mobile-client-service/pulls/comments/206803372","pull_request_review_id":142284010,"id":206803372,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNjgwMzM3Mg==","diff_hunk":"@@ -17,5 +18,37 @@ func NewServiceInstanceLister(scClient scv1beta1.ServicecatalogV1beta1Interface)\n \n func (lister *ServiceInstanceListerImpl) List(namespace string) (*ServiceInstanceList, error) {\n \tlistOpts := v1.ListOptions{}\n-\treturn lister.scClient.ServiceInstances(namespace).List(listOpts)\n+\tgetOpts := v1.GetOptions{}\n+\tserviceInstanceList := ServiceInstanceList{}\n+\n+\tserviceInstances, err := lister.scClient.ServiceInstances(namespace).List(listOpts)\n+\tif err != nil {\n+\t\treturn nil, err\n+\t}\n+\n+\tfor _, si := range serviceInstances.Items {\n+\t\tsc, err := lister.scClient.ClusterServiceClasses().Get(si.Spec.ClusterServiceClassRef.Name, getOpts)\n+\t\tif err != nil {\n+\t\t\treturn nil, err\n+\t\t}\n+\n+\t\tif isMobileService(sc) {\n+\t\t\tserviceInstanceList.Items = append(serviceInstanceList.Items, si)\n+\t\t}\n+\t}\n+\n+\treturn &serviceInstanceList, nil\n+}\n+\n+func isMobileService(sc *v1beta1.ClusterServiceClass) bool {\n+\treturn contains(sc.Spec.Tags, \"mobile-service\")\n+}\n+\n+func contains(s []string, e string) bool {\n+\tfor _, a := range s {\n+\t\tif a == e {\n+\t\t\treturn true\n+\t\t}","path":"pkg/mobile/serviceInstances.go","position":43,"original_position":43,"commit_id":"45e87239634980cbd9ad112d72e2895854db95e2","original_commit_id":"45e87239634980cbd9ad112d72e2895854db95e2","user":{"login":"wei-lee","id":912729,"node_id":"MDQ6VXNlcjkxMjcyOQ==","avatar_url":"https://avatars3.githubusercontent.com/u/912729?v=4","gravatar_id":"","url":"https://api.github.com/users/wei-lee","html_url":"https://github.com/wei-lee","followers_url":"https://api.github.com/users/wei-lee/followers","following_url":"https://api.github.com/users/wei-lee/following{/other_user}","gists_url":"https://api.github.com/users/wei-lee/gists{/gist_id}","starred_url":"https://api.github.com/users/wei-lee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wei-lee/subscriptions","organizations_url":"https://api.github.com/users/wei-lee/orgs","repos_url":"https://api.github.com/users/wei-lee/repos","events_url":"https://api.github.com/users/wei-lee/events{/privacy}","received_events_url":"https://api.github.com/users/wei-lee/received_events","type":"User","site_admin":false},"body":"for a long program, yes. But for a short program like this, unless the code is very very hard to understand, then it is ok to use short var names. It is very common in Golang where short var names are used.","created_at":"2018-08-01T08:58:36Z","updated_at":"2018-08-01T08:58:37Z","html_url":"https://github.com/aerogear/mobile-client-service/pull/29#discussion_r206803372","pull_request_url":"https://api.github.com/repos/aerogear/mobile-client-service/pulls/29","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/aerogear/mobile-client-service/pulls/comments/206803372"},"html":{"href":"https://github.com/aerogear/mobile-client-service/pull/29#discussion_r206803372"},"pull_request":{"href":"https://api.github.com/repos/aerogear/mobile-client-service/pulls/29"}},"in_reply_to_id":206802661},"pull_request":{"url":"https://api.github.com/repos/aerogear/mobile-client-service/pulls/29","id":205151346,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1MTUxMzQ2","html_url":"https://github.com/aerogear/mobile-client-service/pull/29","diff_url":"https://github.com/aerogear/mobile-client-service/pull/29.diff","patch_url":"https://github.com/aerogear/mobile-client-service/pull/29.patch","issue_url":"https://api.github.com/repos/aerogear/mobile-client-service/issues/29","number":29,"state":"open","locked":false,"title":"Filter mobile services and list clients","user":{"login":"sedroche","id":22113654,"node_id":"MDQ6VXNlcjIyMTEzNjU0","avatar_url":"https://avatars1.githubusercontent.com/u/22113654?v=4","gravatar_id":"","url":"https://api.github.com/users/sedroche","html_url":"https://github.com/sedroche","followers_url":"https://api.github.com/users/sedroche/followers","following_url":"https://api.github.com/users/sedroche/following{/other_user}","gists_url":"https://api.github.com/users/sedroche/gists{/gist_id}","starred_url":"https://api.github.com/users/sedroche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sedroche/subscriptions","organizations_url":"https://api.github.com/users/sedroche/orgs","repos_url":"https://api.github.com/users/sedroche/repos","events_url":"https://api.github.com/users/sedroche/events{/privacy}","received_events_url":"https://api.github.com/users/sedroche/received_events","type":"User","site_admin":false},"body":"- Adding list command for clients\r\n- filtering `serviceInstances` which have been tagged `\"mobile-service\"`\r\n\r\nping @wei-lee \r\n\r\n**This branch now requires a new env var. Set:**\r\n\r\n```.bash\r\nexport KUBERNETES_CONFIG=$HOME/.kube/config\r\n```","created_at":"2018-07-31T15:24:35Z","updated_at":"2018-08-01T08:58:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"553fc502db652e417b007eefd218e98890cd884a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/aerogear/mobile-client-service/pulls/29/commits","review_comments_url":"https://api.github.com/repos/aerogear/mobile-client-service/pulls/29/comments","review_comment_url":"https://api.github.com/repos/aerogear/mobile-client-service/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aerogear/mobile-client-service/issues/29/comments","statuses_url":"https://api.github.com/repos/aerogear/mobile-client-service/statuses/45e87239634980cbd9ad112d72e2895854db95e2","head":{"label":"aerogear:listclients","ref":"listclients","sha":"45e87239634980cbd9ad112d72e2895854db95e2","user":{"login":"aerogear","id":954205,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk1NDIwNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/954205?v=4","gravatar_id":"","url":"https://api.github.com/users/aerogear","html_url":"https://github.com/aerogear","followers_url":"https://api.github.com/users/aerogear/followers","following_url":"https://api.github.com/users/aerogear/following{/other_user}","gists_url":"https://api.github.com/users/aerogear/gists{/gist_id}","starred_url":"https://api.github.com/users/aerogear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aerogear/subscriptions","organizations_url":"https://api.github.com/users/aerogear/orgs","repos_url":"https://api.github.com/users/aerogear/repos","events_url":"https://api.github.com/users/aerogear/events{/privacy}","received_events_url":"https://api.github.com/users/aerogear/received_events","type":"Organization","site_admin":false},"repo":{"id":141608523,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE2MDg1MjM=","name":"mobile-client-service","full_name":"aerogear/mobile-client-service","owner":{"login":"aerogear","id":954205,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk1NDIwNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/954205?v=4","gravatar_id":"","url":"https://api.github.com/users/aerogear","html_url":"https://github.com/aerogear","followers_url":"https://api.github.com/users/aerogear/followers","following_url":"https://api.github.com/users/aerogear/following{/other_user}","gists_url":"https://api.github.com/users/aerogear/gists{/gist_id}","starred_url":"https://api.github.com/users/aerogear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aerogear/subscriptions","organizations_url":"https://api.github.com/users/aerogear/orgs","repos_url":"https://api.github.com/users/aerogear/repos","events_url":"https://api.github.com/users/aerogear/events{/privacy}","received_events_url":"https://api.github.com/users/aerogear/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aerogear/mobile-client-service","description":"Mobile Client Service","fork":false,"url":"https://api.github.com/repos/aerogear/mobile-client-service","forks_url":"https://api.github.com/repos/aerogear/mobile-client-service/forks","keys_url":"https://api.github.com/repos/aerogear/mobile-client-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aerogear/mobile-client-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aerogear/mobile-client-service/teams","hooks_url":"https://api.github.com/repos/aerogear/mobile-client-service/hooks","issue_events_url":"https://api.github.com/repos/aerogear/mobile-client-service/issues/events{/number}","events_url":"https://api.github.com/repos/aerogear/mobile-client-service/events","assignees_url":"https://api.github.com/repos/aerogear/mobile-client-service/assignees{/user}","branches_url":"https://api.github.com/repos/aerogear/mobile-client-service/branches{/branch}","tags_url":"https://api.github.com/repos/aerogear/mobile-client-service/tags","blobs_url":"https://api.github.com/repos/aerogear/mobile-client-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aerogear/mobile-client-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aerogear/mobile-client-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/aerogear/mobile-client-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aerogear/mobile-client-service/statuses/{sha}","languages_url":"https://api.github.com/repos/aerogear/mobile-client-service/languages","stargazers_url":"https://api.github.com/repos/aerogear/mobile-client-service/stargazers","contributors_url":"https://api.github.com/repos/aerogear/mobile-client-service/contributors","subscribers_url":"https://api.github.com/repos/aerogear/mobile-client-service/subscribers","subscription_url":"https://api.github.com/repos/aerogear/mobile-client-service/subscription","commits_url":"https://api.github.com/repos/aerogear/mobile-client-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/aerogear/mobile-client-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/aerogear/mobile-client-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/aerogear/mobile-client-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/aerogear/mobile-client-service/contents/{+path}","compare_url":"https://api.github.com/repos/aerogear/mobile-client-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aerogear/mobile-client-service/merges","archive_url":"https://api.github.com/repos/aerogear/mobile-client-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aerogear/mobile-client-service/downloads","issues_url":"https://api.github.com/repos/aerogear/mobile-client-service/issues{/number}","pulls_url":"https://api.github.com/repos/aerogear/mobile-client-service/pulls{/number}","milestones_url":"https://api.github.com/repos/aerogear/mobile-client-service/milestones{/number}","notifications_url":"https://api.github.com/repos/aerogear/mobile-client-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aerogear/mobile-client-service/labels{/name}","releases_url":"https://api.github.com/repos/aerogear/mobile-client-service/releases{/id}","deployments_url":"https://api.github.com/repos/aerogear/mobile-client-service/deployments","created_at":"2018-07-19T17:02:21Z","updated_at":"2018-07-31T11:13:14Z","pushed_at":"2018-08-01T08:54:58Z","git_url":"git://github.com/aerogear/mobile-client-service.git","ssh_url":"git@github.com:aerogear/mobile-client-service.git","clone_url":"https://github.com/aerogear/mobile-client-service.git","svn_url":"https://github.com/aerogear/mobile-client-service","homepage":null,"size":567,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":4,"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":7,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"aerogear:master","ref":"master","sha":"711f038ecea68a0ad5710b1bfb06fb3cd05c4a4e","user":{"login":"aerogear","id":954205,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk1NDIwNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/954205?v=4","gravatar_id":"","url":"https://api.github.com/users/aerogear","html_url":"https://github.com/aerogear","followers_url":"https://api.github.com/users/aerogear/followers","following_url":"https://api.github.com/users/aerogear/following{/other_user}","gists_url":"https://api.github.com/users/aerogear/gists{/gist_id}","starred_url":"https://api.github.com/users/aerogear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aerogear/subscriptions","organizations_url":"https://api.github.com/users/aerogear/orgs","repos_url":"https://api.github.com/users/aerogear/repos","events_url":"https://api.github.com/users/aerogear/events{/privacy}","received_events_url":"https://api.github.com/users/aerogear/received_events","type":"Organization","site_admin":false},"repo":{"id":141608523,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE2MDg1MjM=","name":"mobile-client-service","full_name":"aerogear/mobile-client-service","owner":{"login":"aerogear","id":954205,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk1NDIwNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/954205?v=4","gravatar_id":"","url":"https://api.github.com/users/aerogear","html_url":"https://github.com/aerogear","followers_url":"https://api.github.com/users/aerogear/followers","following_url":"https://api.github.com/users/aerogear/following{/other_user}","gists_url":"https://api.github.com/users/aerogear/gists{/gist_id}","starred_url":"https://api.github.com/users/aerogear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aerogear/subscriptions","organizations_url":"https://api.github.com/users/aerogear/orgs","repos_url":"https://api.github.com/users/aerogear/repos","events_url":"https://api.github.com/users/aerogear/events{/privacy}","received_events_url":"https://api.github.com/users/aerogear/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aerogear/mobile-client-service","description":"Mobile Client Service","fork":false,"url":"https://api.github.com/repos/aerogear/mobile-client-service","forks_url":"https://api.github.com/repos/aerogear/mobile-client-service/forks","keys_url":"https://api.github.com/repos/aerogear/mobile-client-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aerogear/mobile-client-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aerogear/mobile-client-service/teams","hooks_url":"https://api.github.com/repos/aerogear/mobile-client-service/hooks","issue_events_url":"https://api.github.com/repos/aerogear/mobile-client-service/issues/events{/number}","events_url":"https://api.github.com/repos/aerogear/mobile-client-service/events","assignees_url":"https://api.github.com/repos/aerogear/mobile-client-service/assignees{/user}","branches_url":"https://api.github.com/repos/aerogear/mobile-client-service/branches{/branch}","tags_url":"https://api.github.com/repos/aerogear/mobile-client-service/tags","blobs_url":"https://api.github.com/repos/aerogear/mobile-client-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aerogear/mobile-client-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aerogear/mobile-client-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/aerogear/mobile-client-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aerogear/mobile-client-service/statuses/{sha}","languages_url":"https://api.github.com/repos/aerogear/mobile-client-service/languages","stargazers_url":"https://api.github.com/repos/aerogear/mobile-client-service/stargazers","contributors_url":"https://api.github.com/repos/aerogear/mobile-client-service/contributors","subscribers_url":"https://api.github.com/repos/aerogear/mobile-client-service/subscribers","subscription_url":"https://api.github.com/repos/aerogear/mobile-client-service/subscription","commits_url":"https://api.github.com/repos/aerogear/mobile-client-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/aerogear/mobile-client-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/aerogear/mobile-client-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/aerogear/mobile-client-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/aerogear/mobile-client-service/contents/{+path}","compare_url":"https://api.github.com/repos/aerogear/mobile-client-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aerogear/mobile-client-service/merges","archive_url":"https://api.github.com/repos/aerogear/mobile-client-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aerogear/mobile-client-service/downloads","issues_url":"https://api.github.com/repos/aerogear/mobile-client-service/issues{/number}","pulls_url":"https://api.github.com/repos/aerogear/mobile-client-service/pulls{/number}","milestones_url":"https://api.github.com/repos/aerogear/mobile-client-service/milestones{/number}","notifications_url":"https://api.github.com/repos/aerogear/mobile-client-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aerogear/mobile-client-service/labels{/name}","releases_url":"https://api.github.com/repos/aerogear/mobile-client-service/releases{/id}","deployments_url":"https://api.github.com/repos/aerogear/mobile-client-service/deployments","created_at":"2018-07-19T17:02:21Z","updated_at":"2018-07-31T11:13:14Z","pushed_at":"2018-08-01T08:54:58Z","git_url":"git://github.com/aerogear/mobile-client-service.git","ssh_url":"git@github.com:aerogear/mobile-client-service.git","clone_url":"https://github.com/aerogear/mobile-client-service.git","svn_url":"https://github.com/aerogear/mobile-client-service","homepage":null,"size":567,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":4,"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":7,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aerogear/mobile-client-service/pulls/29"},"html":{"href":"https://github.com/aerogear/mobile-client-service/pull/29"},"issue":{"href":"https://api.github.com/repos/aerogear/mobile-client-service/issues/29"},"comments":{"href":"https://api.github.com/repos/aerogear/mobile-client-service/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/aerogear/mobile-client-service/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/aerogear/mobile-client-service/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aerogear/mobile-client-service/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/aerogear/mobile-client-service/statuses/45e87239634980cbd9ad112d72e2895854db95e2"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"wei-lee"}}