{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin/pulls/comments/33997650","id":33997650,"diff_hunk":"@@ -491,6 +491,41 @@ oc get template ruby-helloworld-sample\n [ \"$(oc new-app ruby-helloworld-sample -o yaml | grep MYSQL_PASSWORD)\" ]\n [ \"$(oc new-app ruby-helloworld-sample -o yaml | grep ADMIN_USERNAME)\" ]\n [ \"$(oc new-app ruby-helloworld-sample -o yaml | grep ADMIN_PASSWORD)\" ]\n+# check search\n+oc create -f examples/image-streams/image-streams-centos7.json\n+[ \"$(oc new-app --search mysql | grep mysql-55-centos7)\" ]\n+[ \"$(oc new-app --search ruby-helloworld-sample | grep ruby-helloworld-sample)\" ]\n+# check search - partial matches\n+[ \"$(oc new-app --search ruby-hellow | grep ruby-helloworld-sample)\" ]\n+[ \"$(oc new-app --search --template=ruby-hel | grep ruby-helloworld-sample)\" ]\n+[ \"$(oc new-app --search --template=ruby-helloworld-sam -o yaml | grep ruby-helloworld-sample)\" ]\n+[ \"$(oc new-app --search rub | grep openshift/ruby-20-centos7)\" ]\n+[ \"$(oc new-app --search --image-stream=rub | grep openshift/ruby-20-centos7)\" ]\n+# check search - check correct usage of filters\n+[ ! \"$(oc new-app --search --image-stream=ruby-heloworld-sample | grep application-template-stibuild)\" ]\n+[ ! \"$(oc new-app --search --template=mongodb)\" ]\n+[ ! \"$(oc new-app --search --template=nodejs)\" ]\n+[ ! \"$(oc new-app --search --template=perl)\" ]\n+[ ! \"$(oc new-app --search --template=php)\" ]\n+# check search - filtered, exact matches\n+[ \"$(oc new-app --search --image-stream=mongodb | grep openshift/mongodb-24-centos7)\" ]\n+[ \"$(oc new-app --search --image-stream=mysql | grep openshift/mysql-55-centos7)\" ]\n+[ \"$(oc new-app --search --image-stream=nodejs | grep openshift/nodejs-010-centos7)\" ]\n+[ \"$(oc new-app --search --image-stream=perl | grep openshift/perl-516-centos7)\" ]\n+[ \"$(oc new-app --search --image-stream=php | grep openshift/php-55-centos7)\" ]\n+[ \"$(oc new-app --search --image-stream=postgresql | grep openshift/postgresql-92-centos7)\" ]\n+[ \"$(oc new-app --search --image-stream=python | grep openshift/python-33-centos7)\" ]\n+[ \"$(oc new-app --search --image-stream=ruby | grep openshift/ruby-20-centos7)\" ]\n+[ \"$(oc new-app --search --image-stream=wildfly | grep openshift/wildfly-8-centos)\" ]\n+[ \"$(oc new-app --search --template=ruby-helloworld-sample | grep ruby-helloworld-sample)\" ]\n+# check search - no matches\n+[ \"$(oc new-app --search foo-the-bar 2>&1 | grep 'no matches found')\" ]\n+[ \"$(oc new-app --search winter-is-coming 2>&1 | grep 'no matches found')\" ]\n+# check search - mutually exclusive flags\n+[ \"$(oc new-app --search mysql --env=FOO=BAR 2>&1 | grep \"can't be used\")\" ]","path":"hack/test-cmd.sh","position":35,"original_position":35,"commit_id":"b0176709479c06997118b1bcc371e4180e64c75b","original_commit_id":"b0176709479c06997118b1bcc371e4180e64c75b","user":{"login":"smarterclayton","id":1163175,"avatar_url":"https://avatars.githubusercontent.com/u/1163175?v=3","gravatar_id":"","url":"https://api.github.com/users/smarterclayton","html_url":"https://github.com/smarterclayton","followers_url":"https://api.github.com/users/smarterclayton/followers","following_url":"https://api.github.com/users/smarterclayton/following{/other_user}","gists_url":"https://api.github.com/users/smarterclayton/gists{/gist_id}","starred_url":"https://api.github.com/users/smarterclayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarterclayton/subscriptions","organizations_url":"https://api.github.com/users/smarterclayton/orgs","repos_url":"https://api.github.com/users/smarterclayton/repos","events_url":"https://api.github.com/users/smarterclayton/events{/privacy}","received_events_url":"https://api.github.com/users/smarterclayton/received_events","type":"User","site_admin":false},"body":"Check for a -S in here","created_at":"2015-07-07T00:19:45Z","updated_at":"2015-07-07T00:19:45Z","html_url":"https://github.com/openshift/origin/pull/2985#discussion_r33997650","pull_request_url":"https://api.github.com/repos/openshift/origin/pulls/2985","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments/33997650"},"html":{"href":"https://github.com/openshift/origin/pull/2985#discussion_r33997650"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin/pulls/2985"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/2985","id":37217516,"html_url":"https://github.com/openshift/origin/pull/2985","diff_url":"https://github.com/openshift/origin/pull/2985.diff","patch_url":"https://github.com/openshift/origin/pull/2985.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/2985","number":2985,"state":"open","locked":false,"title":"new-app search/list","user":{"login":"fabianofranz","id":158611,"avatar_url":"https://avatars.githubusercontent.com/u/158611?v=3","gravatar_id":"","url":"https://api.github.com/users/fabianofranz","html_url":"https://github.com/fabianofranz","followers_url":"https://api.github.com/users/fabianofranz/followers","following_url":"https://api.github.com/users/fabianofranz/following{/other_user}","gists_url":"https://api.github.com/users/fabianofranz/gists{/gist_id}","starred_url":"https://api.github.com/users/fabianofranz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabianofranz/subscriptions","organizations_url":"https://api.github.com/users/fabianofranz/orgs","repos_url":"https://api.github.com/users/fabianofranz/repos","events_url":"https://api.github.com/users/fabianofranz/events{/privacy}","received_events_url":"https://api.github.com/users/fabianofranz/received_events","type":"User","site_admin":false},"body":"Introduces the `Searcher` interface that splits the logic in `Resolver`'s to make a clear separation between  who *finds* matches (zero, one or multiple) based on a provided query, and who *resolves* the results returned by a searcher to one single match (or errors like no/multiple matches found).\r\n\r\nAdds supports to search in `osc new-app` through the `--search` flag, that will make the command behave as a search. Other flags like `--docker-image`, `--image` and `--template` can be used to filter the search results.\r\n\r\nFixed by this PR:\r\nhttps://github.com/openshift/origin/issues/2672\r\nhttps://github.com/openshift/origin/issues/1878\r\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1228265","created_at":"2015-06-09T03:53:15Z","updated_at":"2015-07-07T00:19:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1d04bb4f5c24deea24d84bbb19d66fa7b316b275","assignee":null,"milestone":{"url":"https://api.github.com/repos/openshift/origin/milestones/5","html_url":"https://github.com/openshift/origin/milestones/1.1.0","labels_url":"https://api.github.com/repos/openshift/origin/milestones/5/labels","id":1119756,"number":5,"title":"1.1.0","description":"","creator":{"login":"smarterclayton","id":1163175,"avatar_url":"https://avatars.githubusercontent.com/u/1163175?v=3","gravatar_id":"","url":"https://api.github.com/users/smarterclayton","html_url":"https://github.com/smarterclayton","followers_url":"https://api.github.com/users/smarterclayton/followers","following_url":"https://api.github.com/users/smarterclayton/following{/other_user}","gists_url":"https://api.github.com/users/smarterclayton/gists{/gist_id}","starred_url":"https://api.github.com/users/smarterclayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarterclayton/subscriptions","organizations_url":"https://api.github.com/users/smarterclayton/orgs","repos_url":"https://api.github.com/users/smarterclayton/repos","events_url":"https://api.github.com/users/smarterclayton/events{/privacy}","received_events_url":"https://api.github.com/users/smarterclayton/received_events","type":"User","site_admin":false},"open_issues":251,"closed_issues":61,"state":"open","created_at":"2015-05-20T04:04:56Z","updated_at":"2015-07-06T19:49:45Z","due_on":"2015-07-15T04:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/openshift/origin/pulls/2985/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/2985/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/2985/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/b0176709479c06997118b1bcc371e4180e64c75b","head":{"label":"fabianofranz:issues_2672_newapp_search","ref":"issues_2672_newapp_search","sha":"b0176709479c06997118b1bcc371e4180e64c75b","user":{"login":"fabianofranz","id":158611,"avatar_url":"https://avatars.githubusercontent.com/u/158611?v=3","gravatar_id":"","url":"https://api.github.com/users/fabianofranz","html_url":"https://github.com/fabianofranz","followers_url":"https://api.github.com/users/fabianofranz/followers","following_url":"https://api.github.com/users/fabianofranz/following{/other_user}","gists_url":"https://api.github.com/users/fabianofranz/gists{/gist_id}","starred_url":"https://api.github.com/users/fabianofranz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabianofranz/subscriptions","organizations_url":"https://api.github.com/users/fabianofranz/orgs","repos_url":"https://api.github.com/users/fabianofranz/repos","events_url":"https://api.github.com/users/fabianofranz/events{/privacy}","received_events_url":"https://api.github.com/users/fabianofranz/received_events","type":"User","site_admin":false},"repo":{"id":23366851,"name":"origin","full_name":"fabianofranz/origin","owner":{"login":"fabianofranz","id":158611,"avatar_url":"https://avatars.githubusercontent.com/u/158611?v=3","gravatar_id":"","url":"https://api.github.com/users/fabianofranz","html_url":"https://github.com/fabianofranz","followers_url":"https://api.github.com/users/fabianofranz/followers","following_url":"https://api.github.com/users/fabianofranz/following{/other_user}","gists_url":"https://api.github.com/users/fabianofranz/gists{/gist_id}","starred_url":"https://api.github.com/users/fabianofranz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabianofranz/subscriptions","organizations_url":"https://api.github.com/users/fabianofranz/orgs","repos_url":"https://api.github.com/users/fabianofranz/repos","events_url":"https://api.github.com/users/fabianofranz/events{/privacy}","received_events_url":"https://api.github.com/users/fabianofranz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fabianofranz/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":true,"url":"https://api.github.com/repos/fabianofranz/origin","forks_url":"https://api.github.com/repos/fabianofranz/origin/forks","keys_url":"https://api.github.com/repos/fabianofranz/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fabianofranz/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fabianofranz/origin/teams","hooks_url":"https://api.github.com/repos/fabianofranz/origin/hooks","issue_events_url":"https://api.github.com/repos/fabianofranz/origin/issues/events{/number}","events_url":"https://api.github.com/repos/fabianofranz/origin/events","assignees_url":"https://api.github.com/repos/fabianofranz/origin/assignees{/user}","branches_url":"https://api.github.com/repos/fabianofranz/origin/branches{/branch}","tags_url":"https://api.github.com/repos/fabianofranz/origin/tags","blobs_url":"https://api.github.com/repos/fabianofranz/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fabianofranz/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fabianofranz/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/fabianofranz/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fabianofranz/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/fabianofranz/origin/languages","stargazers_url":"https://api.github.com/repos/fabianofranz/origin/stargazers","contributors_url":"https://api.github.com/repos/fabianofranz/origin/contributors","subscribers_url":"https://api.github.com/repos/fabianofranz/origin/subscribers","subscription_url":"https://api.github.com/repos/fabianofranz/origin/subscription","commits_url":"https://api.github.com/repos/fabianofranz/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/fabianofranz/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/fabianofranz/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/fabianofranz/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/fabianofranz/origin/contents/{+path}","compare_url":"https://api.github.com/repos/fabianofranz/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fabianofranz/origin/merges","archive_url":"https://api.github.com/repos/fabianofranz/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fabianofranz/origin/downloads","issues_url":"https://api.github.com/repos/fabianofranz/origin/issues{/number}","pulls_url":"https://api.github.com/repos/fabianofranz/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/fabianofranz/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/fabianofranz/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fabianofranz/origin/labels{/name}","releases_url":"https://api.github.com/repos/fabianofranz/origin/releases{/id}","created_at":"2014-08-26T21:06:40Z","updated_at":"2015-04-24T16:39:47Z","pushed_at":"2015-07-06T21:42:52Z","git_url":"git://github.com/fabianofranz/origin.git","ssh_url":"git@github.com:fabianofranz/origin.git","clone_url":"https://github.com/fabianofranz/origin.git","svn_url":"https://github.com/fabianofranz/origin","homepage":"https://openshift.github.io","size":121582,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"openshift:master","ref":"master","sha":"273775ab9a85779285c7e5437136acc1a6a22c69","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":22442668,"name":"origin","full_name":"openshift/origin","owner":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":false,"url":"https://api.github.com/repos/openshift/origin","forks_url":"https://api.github.com/repos/openshift/origin/forks","keys_url":"https://api.github.com/repos/openshift/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/origin/teams","hooks_url":"https://api.github.com/repos/openshift/origin/hooks","issue_events_url":"https://api.github.com/repos/openshift/origin/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/origin/events","assignees_url":"https://api.github.com/repos/openshift/origin/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/origin/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/origin/tags","blobs_url":"https://api.github.com/repos/openshift/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/origin/languages","stargazers_url":"https://api.github.com/repos/openshift/origin/stargazers","contributors_url":"https://api.github.com/repos/openshift/origin/contributors","subscribers_url":"https://api.github.com/repos/openshift/origin/subscribers","subscription_url":"https://api.github.com/repos/openshift/origin/subscription","commits_url":"https://api.github.com/repos/openshift/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/origin/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/origin/merges","archive_url":"https://api.github.com/repos/openshift/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/origin/downloads","issues_url":"https://api.github.com/repos/openshift/origin/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/origin/labels{/name}","releases_url":"https://api.github.com/repos/openshift/origin/releases{/id}","created_at":"2014-07-30T20:04:05Z","updated_at":"2015-07-05T11:18:40Z","pushed_at":"2015-07-07T00:10:28Z","git_url":"git://github.com/openshift/origin.git","ssh_url":"git@github.com:openshift/origin.git","clone_url":"https://github.com/openshift/origin.git","svn_url":"https://github.com/openshift/origin","homepage":"http://www.openshift.org","size":183587,"stargazers_count":527,"watchers_count":527,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":282,"mirror_url":null,"open_issues_count":403,"forks":282,"open_issues":403,"watchers":527,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/2985"},"html":{"href":"https://github.com/openshift/origin/pull/2985"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/2985"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/2985/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/2985/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/2985/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/b0176709479c06997118b1bcc371e4180e64c75b"}}}}