{"action":"created","comment":{"url":"https://api.github.com/repos/spinnaker/orca/pulls/comments/55248286","id":55248286,"diff_hunk":"@@ -114,12 +114,14 @@ class TargetServerGroupResolver {\n \n     def tsg = tsgs.find {\n       (stage.context.regions && stage.context.regions.contains(it.getLocation().value)) ||\n-        (stage.context.zones && stage.context.zones.contains(it.getLocation().value))\n+        (stage.context.zones && stage.context.zones.contains(it.getLocation().value)) ||","path":"orca-clouddriver/src/main/groovy/com/netflix/spinnaker/orca/clouddriver/pipeline/servergroup/support/TargetServerGroupResolver.groovy","position":14,"original_position":14,"commit_id":"6239a68ad7e13cb5ec6628b2bed380d41fa60c03","original_commit_id":"6239a68ad7e13cb5ec6628b2bed380d41fa60c03","user":{"login":"duftler","id":8437718,"avatar_url":"https://avatars.githubusercontent.com/u/8437718?v=3","gravatar_id":"","url":"https://api.github.com/users/duftler","html_url":"https://github.com/duftler","followers_url":"https://api.github.com/users/duftler/followers","following_url":"https://api.github.com/users/duftler/following{/other_user}","gists_url":"https://api.github.com/users/duftler/gists{/gist_id}","starred_url":"https://api.github.com/users/duftler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duftler/subscriptions","organizations_url":"https://api.github.com/users/duftler/orgs","repos_url":"https://api.github.com/users/duftler/repos","events_url":"https://api.github.com/users/duftler/events{/privacy}","received_events_url":"https://api.github.com/users/duftler/received_events","type":"User","site_admin":false},"body":"I think you can use:\r\ndef location = it.getLocation().value\r\nreturn (stage.context.regions?.contains(location) || (stage.context.zones?.contains(location) || (stage.context.namespaces?.contains(location))","created_at":"2016-03-07T18:32:34Z","updated_at":"2016-03-07T18:32:34Z","html_url":"https://github.com/spinnaker/orca/pull/757#discussion_r55248286","pull_request_url":"https://api.github.com/repos/spinnaker/orca/pulls/757","_links":{"self":{"href":"https://api.github.com/repos/spinnaker/orca/pulls/comments/55248286"},"html":{"href":"https://github.com/spinnaker/orca/pull/757#discussion_r55248286"},"pull_request":{"href":"https://api.github.com/repos/spinnaker/orca/pulls/757"}}},"pull_request":{"url":"https://api.github.com/repos/spinnaker/orca/pulls/757","id":61820783,"html_url":"https://github.com/spinnaker/orca/pull/757","diff_url":"https://github.com/spinnaker/orca/pull/757.diff","patch_url":"https://github.com/spinnaker/orca/pull/757.patch","issue_url":"https://api.github.com/repos/spinnaker/orca/issues/757","number":757,"state":"open","locked":false,"title":"provider/kubernetes: Add `NAMESPACE` to Location types.","user":{"login":"lwander","id":4874941,"avatar_url":"https://avatars.githubusercontent.com/u/4874941?v=3","gravatar_id":"","url":"https://api.github.com/users/lwander","html_url":"https://github.com/lwander","followers_url":"https://api.github.com/users/lwander/followers","following_url":"https://api.github.com/users/lwander/following{/other_user}","gists_url":"https://api.github.com/users/lwander/gists{/gist_id}","starred_url":"https://api.github.com/users/lwander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lwander/subscriptions","organizations_url":"https://api.github.com/users/lwander/orgs","repos_url":"https://api.github.com/users/lwander/repos","events_url":"https://api.github.com/users/lwander/events{/privacy}","received_events_url":"https://api.github.com/users/lwander/received_events","type":"User","site_admin":false},"body":"This is needed to correctly do dynamic lookups of kubernetes server groups for use by pipeline stages.\r\n\r\n@duftler ","created_at":"2016-03-05T19:04:33Z","updated_at":"2016-03-07T18:32:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"40de543994ae73f508edca59a6a2e1558f381cda","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/spinnaker/orca/pulls/757/commits","review_comments_url":"https://api.github.com/repos/spinnaker/orca/pulls/757/comments","review_comment_url":"https://api.github.com/repos/spinnaker/orca/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spinnaker/orca/issues/757/comments","statuses_url":"https://api.github.com/repos/spinnaker/orca/statuses/6239a68ad7e13cb5ec6628b2bed380d41fa60c03","head":{"label":"lwander:kubernetes-add-namespace-location-type","ref":"kubernetes-add-namespace-location-type","sha":"6239a68ad7e13cb5ec6628b2bed380d41fa60c03","user":{"login":"lwander","id":4874941,"avatar_url":"https://avatars.githubusercontent.com/u/4874941?v=3","gravatar_id":"","url":"https://api.github.com/users/lwander","html_url":"https://github.com/lwander","followers_url":"https://api.github.com/users/lwander/followers","following_url":"https://api.github.com/users/lwander/following{/other_user}","gists_url":"https://api.github.com/users/lwander/gists{/gist_id}","starred_url":"https://api.github.com/users/lwander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lwander/subscriptions","organizations_url":"https://api.github.com/users/lwander/orgs","repos_url":"https://api.github.com/users/lwander/repos","events_url":"https://api.github.com/users/lwander/events{/privacy}","received_events_url":"https://api.github.com/users/lwander/received_events","type":"User","site_admin":false},"repo":{"id":47214636,"name":"orca","full_name":"lwander/orca","owner":{"login":"lwander","id":4874941,"avatar_url":"https://avatars.githubusercontent.com/u/4874941?v=3","gravatar_id":"","url":"https://api.github.com/users/lwander","html_url":"https://github.com/lwander","followers_url":"https://api.github.com/users/lwander/followers","following_url":"https://api.github.com/users/lwander/following{/other_user}","gists_url":"https://api.github.com/users/lwander/gists{/gist_id}","starred_url":"https://api.github.com/users/lwander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lwander/subscriptions","organizations_url":"https://api.github.com/users/lwander/orgs","repos_url":"https://api.github.com/users/lwander/repos","events_url":"https://api.github.com/users/lwander/events{/privacy}","received_events_url":"https://api.github.com/users/lwander/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lwander/orca","description":"orchestration engine","fork":true,"url":"https://api.github.com/repos/lwander/orca","forks_url":"https://api.github.com/repos/lwander/orca/forks","keys_url":"https://api.github.com/repos/lwander/orca/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lwander/orca/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lwander/orca/teams","hooks_url":"https://api.github.com/repos/lwander/orca/hooks","issue_events_url":"https://api.github.com/repos/lwander/orca/issues/events{/number}","events_url":"https://api.github.com/repos/lwander/orca/events","assignees_url":"https://api.github.com/repos/lwander/orca/assignees{/user}","branches_url":"https://api.github.com/repos/lwander/orca/branches{/branch}","tags_url":"https://api.github.com/repos/lwander/orca/tags","blobs_url":"https://api.github.com/repos/lwander/orca/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lwander/orca/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lwander/orca/git/refs{/sha}","trees_url":"https://api.github.com/repos/lwander/orca/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lwander/orca/statuses/{sha}","languages_url":"https://api.github.com/repos/lwander/orca/languages","stargazers_url":"https://api.github.com/repos/lwander/orca/stargazers","contributors_url":"https://api.github.com/repos/lwander/orca/contributors","subscribers_url":"https://api.github.com/repos/lwander/orca/subscribers","subscription_url":"https://api.github.com/repos/lwander/orca/subscription","commits_url":"https://api.github.com/repos/lwander/orca/commits{/sha}","git_commits_url":"https://api.github.com/repos/lwander/orca/git/commits{/sha}","comments_url":"https://api.github.com/repos/lwander/orca/comments{/number}","issue_comment_url":"https://api.github.com/repos/lwander/orca/issues/comments{/number}","contents_url":"https://api.github.com/repos/lwander/orca/contents/{+path}","compare_url":"https://api.github.com/repos/lwander/orca/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lwander/orca/merges","archive_url":"https://api.github.com/repos/lwander/orca/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lwander/orca/downloads","issues_url":"https://api.github.com/repos/lwander/orca/issues{/number}","pulls_url":"https://api.github.com/repos/lwander/orca/pulls{/number}","milestones_url":"https://api.github.com/repos/lwander/orca/milestones{/number}","notifications_url":"https://api.github.com/repos/lwander/orca/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lwander/orca/labels{/name}","releases_url":"https://api.github.com/repos/lwander/orca/releases{/id}","deployments_url":"https://api.github.com/repos/lwander/orca/deployments","created_at":"2015-12-01T20:12:51Z","updated_at":"2016-02-08T18:05:23Z","pushed_at":"2016-03-05T19:04:24Z","git_url":"git://github.com/lwander/orca.git","ssh_url":"git@github.com:lwander/orca.git","clone_url":"https://github.com/lwander/orca.git","svn_url":"https://github.com/lwander/orca","homepage":"","size":5800,"stargazers_count":0,"watchers_count":0,"language":"Groovy","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"spinnaker:master","ref":"master","sha":"f2210fa8a7a91d73e5e979faa80c7435ebf9d326","user":{"login":"spinnaker","id":7634182,"avatar_url":"https://avatars.githubusercontent.com/u/7634182?v=3","gravatar_id":"","url":"https://api.github.com/users/spinnaker","html_url":"https://github.com/spinnaker","followers_url":"https://api.github.com/users/spinnaker/followers","following_url":"https://api.github.com/users/spinnaker/following{/other_user}","gists_url":"https://api.github.com/users/spinnaker/gists{/gist_id}","starred_url":"https://api.github.com/users/spinnaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinnaker/subscriptions","organizations_url":"https://api.github.com/users/spinnaker/orgs","repos_url":"https://api.github.com/users/spinnaker/repos","events_url":"https://api.github.com/users/spinnaker/events{/privacy}","received_events_url":"https://api.github.com/users/spinnaker/received_events","type":"Organization","site_admin":false},"repo":{"id":19834314,"name":"orca","full_name":"spinnaker/orca","owner":{"login":"spinnaker","id":7634182,"avatar_url":"https://avatars.githubusercontent.com/u/7634182?v=3","gravatar_id":"","url":"https://api.github.com/users/spinnaker","html_url":"https://github.com/spinnaker","followers_url":"https://api.github.com/users/spinnaker/followers","following_url":"https://api.github.com/users/spinnaker/following{/other_user}","gists_url":"https://api.github.com/users/spinnaker/gists{/gist_id}","starred_url":"https://api.github.com/users/spinnaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinnaker/subscriptions","organizations_url":"https://api.github.com/users/spinnaker/orgs","repos_url":"https://api.github.com/users/spinnaker/repos","events_url":"https://api.github.com/users/spinnaker/events{/privacy}","received_events_url":"https://api.github.com/users/spinnaker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spinnaker/orca","description":"orchestration engine","fork":false,"url":"https://api.github.com/repos/spinnaker/orca","forks_url":"https://api.github.com/repos/spinnaker/orca/forks","keys_url":"https://api.github.com/repos/spinnaker/orca/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spinnaker/orca/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spinnaker/orca/teams","hooks_url":"https://api.github.com/repos/spinnaker/orca/hooks","issue_events_url":"https://api.github.com/repos/spinnaker/orca/issues/events{/number}","events_url":"https://api.github.com/repos/spinnaker/orca/events","assignees_url":"https://api.github.com/repos/spinnaker/orca/assignees{/user}","branches_url":"https://api.github.com/repos/spinnaker/orca/branches{/branch}","tags_url":"https://api.github.com/repos/spinnaker/orca/tags","blobs_url":"https://api.github.com/repos/spinnaker/orca/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spinnaker/orca/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spinnaker/orca/git/refs{/sha}","trees_url":"https://api.github.com/repos/spinnaker/orca/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spinnaker/orca/statuses/{sha}","languages_url":"https://api.github.com/repos/spinnaker/orca/languages","stargazers_url":"https://api.github.com/repos/spinnaker/orca/stargazers","contributors_url":"https://api.github.com/repos/spinnaker/orca/contributors","subscribers_url":"https://api.github.com/repos/spinnaker/orca/subscribers","subscription_url":"https://api.github.com/repos/spinnaker/orca/subscription","commits_url":"https://api.github.com/repos/spinnaker/orca/commits{/sha}","git_commits_url":"https://api.github.com/repos/spinnaker/orca/git/commits{/sha}","comments_url":"https://api.github.com/repos/spinnaker/orca/comments{/number}","issue_comment_url":"https://api.github.com/repos/spinnaker/orca/issues/comments{/number}","contents_url":"https://api.github.com/repos/spinnaker/orca/contents/{+path}","compare_url":"https://api.github.com/repos/spinnaker/orca/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spinnaker/orca/merges","archive_url":"https://api.github.com/repos/spinnaker/orca/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spinnaker/orca/downloads","issues_url":"https://api.github.com/repos/spinnaker/orca/issues{/number}","pulls_url":"https://api.github.com/repos/spinnaker/orca/pulls{/number}","milestones_url":"https://api.github.com/repos/spinnaker/orca/milestones{/number}","notifications_url":"https://api.github.com/repos/spinnaker/orca/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spinnaker/orca/labels{/name}","releases_url":"https://api.github.com/repos/spinnaker/orca/releases{/id}","deployments_url":"https://api.github.com/repos/spinnaker/orca/deployments","created_at":"2014-05-15T20:33:00Z","updated_at":"2016-02-26T19:45:14Z","pushed_at":"2016-03-07T01:43:49Z","git_url":"git://github.com/spinnaker/orca.git","ssh_url":"git@github.com:spinnaker/orca.git","clone_url":"https://github.com/spinnaker/orca.git","svn_url":"https://github.com/spinnaker/orca","homepage":"","size":8549,"stargazers_count":18,"watchers_count":18,"language":"Groovy","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":33,"mirror_url":null,"open_issues_count":47,"forks":33,"open_issues":47,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spinnaker/orca/pulls/757"},"html":{"href":"https://github.com/spinnaker/orca/pull/757"},"issue":{"href":"https://api.github.com/repos/spinnaker/orca/issues/757"},"comments":{"href":"https://api.github.com/repos/spinnaker/orca/issues/757/comments"},"review_comments":{"href":"https://api.github.com/repos/spinnaker/orca/pulls/757/comments"},"review_comment":{"href":"https://api.github.com/repos/spinnaker/orca/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spinnaker/orca/pulls/757/commits"},"statuses":{"href":"https://api.github.com/repos/spinnaker/orca/statuses/6239a68ad7e13cb5ec6628b2bed380d41fa60c03"}}}}