{"action":"created","comment":{"url":"https://api.github.com/repos/feedhenry/negotiator/pulls/comments/91266208","pull_request_review_id":11773691,"id":91266208,"diff_hunk":"@@ -22,52 +28,49 @@ type ObjectNamer interface {\n }\n \n type DeployController interface {\n-\tRun(controller.DeployCmd) (interface{}, error)\n+\tRun(DeployCloudAppPayload) (interface{}, error)\n }\n \n-// DeployHandler handles deploying to OpenShift\n-type DeployHandler struct {\n+// Deploy handles deploying to OpenShift\n+type Deploy struct {\n \tlogger           Logger\n \tdeployController controller.Deploy\n \tnamer            Namespacer\n \tobjectNamer      ObjectNamer\n }\n \n-// EnvVar defines an environment variable\n-type EnvVar struct {\n-\tKey   string `json:\"key,omitempty\"`\n-\tValue string `json:\"value,omitempty\"`\n-}\n-\n // DeployCloudAppPayload is the JSON structure sent from the client\n type DeployCloudAppPayload struct {\n \tnamer       Namespacer\n \tobjectNamer ObjectNamer\n-\tDomain      string    `json:\"domain\"`\n-\tEnvVars     []*EnvVar `json:\"envVars,omitempty\"`\n-\tEnvironment string    `json:\"environment\"`\n-\tGUID        string    `json:\"guid\"`\n+\tDomain      string               `json:\"domain\"`\n+\tEnvVars     []*controller.EnvVar `json:\"envVars,omitempty\"`\n+\tEnvironment string               `json:\"environment\"`\n+\tGUID        string               `json:\"guid\"`\n+\tService     string               `json:\"service\"`\n \t// this are the services you require such as redis\n-\tInfraServices []string `json:\"infraServices,omitempty\"`\n-\tNamespace     string   `json:\"namespace\"`\n-\tProjectGUID   string   `json:\"projectGuid\"`\n-\tRepoURL       string   `json:\"repoUrl,omitempty\"`\n-\tRepoBranch    string   `json:\"repoBranch,omitempty\"`\n-\tUser          string   `json:\"user\"`\n-\tAuth          string   `json:\"auth\"`\n+\tInfraServices      []string          `json:\"infraServices,omitempty\"`\n+\tNamespace          string            `json:\"namespace\"`\n+\tProjectGUID        string            `json:\"projectGuid\"`\n+\tRepoURL            string            `json:\"repoUrl,omitempty\"`\n+\tRepoBranchOrCommit string            `json:\"repoBranchOrCommit,omitempty\"`\n+\tUser               string            `json:\"user\"`\n+\tAuth               string            `json:\"auth\"`\n+\tAppTag             string            `json:\"appTag\"`","path":"endpoint/deploy.go","position":71,"original_position":71,"commit_id":"152b081b55e19536367c23a44e0421a4e81da2b6","original_commit_id":"152b081b55e19536367c23a44e0421a4e81da2b6","user":{"login":"philbrookes","id":1033452,"avatar_url":"https://avatars.githubusercontent.com/u/1033452?v=3","gravatar_id":"","url":"https://api.github.com/users/philbrookes","html_url":"https://github.com/philbrookes","followers_url":"https://api.github.com/users/philbrookes/followers","following_url":"https://api.github.com/users/philbrookes/following{/other_user}","gists_url":"https://api.github.com/users/philbrookes/gists{/gist_id}","starred_url":"https://api.github.com/users/philbrookes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philbrookes/subscriptions","organizations_url":"https://api.github.com/users/philbrookes/orgs","repos_url":"https://api.github.com/users/philbrookes/repos","events_url":"https://api.github.com/users/philbrookes/events{/privacy}","received_events_url":"https://api.github.com/users/philbrookes/received_events","type":"User","site_admin":false},"body":"this is along the lines of \"cloud\" or \"redis\" it's the bit that goes at the beginning of the generated name for the services and buildconfigs etc.","created_at":"2016-12-07T10:36:58Z","updated_at":"2016-12-07T10:36:58Z","html_url":"https://github.com/feedhenry/negotiator/pull/7#discussion_r91266208","pull_request_url":"https://api.github.com/repos/feedhenry/negotiator/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/feedhenry/negotiator/pulls/comments/91266208"},"html":{"href":"https://github.com/feedhenry/negotiator/pull/7#discussion_r91266208"},"pull_request":{"href":"https://api.github.com/repos/feedhenry/negotiator/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/feedhenry/negotiator/pulls/7","id":96795994,"html_url":"https://github.com/feedhenry/negotiator/pull/7","diff_url":"https://github.com/feedhenry/negotiator/pull/7.diff","patch_url":"https://github.com/feedhenry/negotiator/pull/7.patch","issue_url":"https://api.github.com/repos/feedhenry/negotiator/issues/7","number":7,"state":"open","locked":false,"title":"Adding deploy config","user":{"login":"philbrookes","id":1033452,"avatar_url":"https://avatars.githubusercontent.com/u/1033452?v=3","gravatar_id":"","url":"https://api.github.com/users/philbrookes","html_url":"https://github.com/philbrookes","followers_url":"https://api.github.com/users/philbrookes/followers","following_url":"https://api.github.com/users/philbrookes/following{/other_user}","gists_url":"https://api.github.com/users/philbrookes/gists{/gist_id}","starred_url":"https://api.github.com/users/philbrookes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philbrookes/subscriptions","organizations_url":"https://api.github.com/users/philbrookes/orgs","repos_url":"https://api.github.com/users/philbrookes/repos","events_url":"https://api.github.com/users/philbrookes/events{/privacy}","received_events_url":"https://api.github.com/users/philbrookes/received_events","type":"User","site_admin":false},"body":"This is just a proof of concept, still requires a generous application of polish.\r\n\r\n## Supported:\r\n- Cloning from public repos\r\n- Cloning from private repos with username / password\r\n- Passing in repo auth via request\r\n- Creating a node.js application with an associated redis pod\r\n- Assigning environment variables with REDIS_HOST to the node.js pod.\r\n- Passing in environment variables via request\r\n\r\n## Unsupported\r\n- Specifying the from image of the node.js application (hard-coded as nodejs:4)\r\n- Cloning from private repos with ssh key\r\n- Returning a URL to track progress of deploy\r\n- Input validation of any kind\r\n- Ports for redis and node.js application are hard-coded\r\n- Redeploying the same app\r\n- Any unit testing","created_at":"2016-12-06T20:09:37Z","updated_at":"2016-12-07T10:36:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ed5801e61de764b9bc99ccc7f6d183f0629c323f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/feedhenry/negotiator/pulls/7/commits","review_comments_url":"https://api.github.com/repos/feedhenry/negotiator/pulls/7/comments","review_comment_url":"https://api.github.com/repos/feedhenry/negotiator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/feedhenry/negotiator/issues/7/comments","statuses_url":"https://api.github.com/repos/feedhenry/negotiator/statuses/152b081b55e19536367c23a44e0421a4e81da2b6","head":{"label":"philbrookes:RHMAP-10513","ref":"RHMAP-10513","sha":"152b081b55e19536367c23a44e0421a4e81da2b6","user":{"login":"philbrookes","id":1033452,"avatar_url":"https://avatars.githubusercontent.com/u/1033452?v=3","gravatar_id":"","url":"https://api.github.com/users/philbrookes","html_url":"https://github.com/philbrookes","followers_url":"https://api.github.com/users/philbrookes/followers","following_url":"https://api.github.com/users/philbrookes/following{/other_user}","gists_url":"https://api.github.com/users/philbrookes/gists{/gist_id}","starred_url":"https://api.github.com/users/philbrookes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philbrookes/subscriptions","organizations_url":"https://api.github.com/users/philbrookes/orgs","repos_url":"https://api.github.com/users/philbrookes/repos","events_url":"https://api.github.com/users/philbrookes/events{/privacy}","received_events_url":"https://api.github.com/users/philbrookes/received_events","type":"User","site_admin":false},"repo":{"id":75173693,"name":"negotiator","full_name":"philbrookes/negotiator","owner":{"login":"philbrookes","id":1033452,"avatar_url":"https://avatars.githubusercontent.com/u/1033452?v=3","gravatar_id":"","url":"https://api.github.com/users/philbrookes","html_url":"https://github.com/philbrookes","followers_url":"https://api.github.com/users/philbrookes/followers","following_url":"https://api.github.com/users/philbrookes/following{/other_user}","gists_url":"https://api.github.com/users/philbrookes/gists{/gist_id}","starred_url":"https://api.github.com/users/philbrookes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philbrookes/subscriptions","organizations_url":"https://api.github.com/users/philbrookes/orgs","repos_url":"https://api.github.com/users/philbrookes/repos","events_url":"https://api.github.com/users/philbrookes/events{/privacy}","received_events_url":"https://api.github.com/users/philbrookes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/philbrookes/negotiator","description":null,"fork":true,"url":"https://api.github.com/repos/philbrookes/negotiator","forks_url":"https://api.github.com/repos/philbrookes/negotiator/forks","keys_url":"https://api.github.com/repos/philbrookes/negotiator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/philbrookes/negotiator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/philbrookes/negotiator/teams","hooks_url":"https://api.github.com/repos/philbrookes/negotiator/hooks","issue_events_url":"https://api.github.com/repos/philbrookes/negotiator/issues/events{/number}","events_url":"https://api.github.com/repos/philbrookes/negotiator/events","assignees_url":"https://api.github.com/repos/philbrookes/negotiator/assignees{/user}","branches_url":"https://api.github.com/repos/philbrookes/negotiator/branches{/branch}","tags_url":"https://api.github.com/repos/philbrookes/negotiator/tags","blobs_url":"https://api.github.com/repos/philbrookes/negotiator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/philbrookes/negotiator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/philbrookes/negotiator/git/refs{/sha}","trees_url":"https://api.github.com/repos/philbrookes/negotiator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/philbrookes/negotiator/statuses/{sha}","languages_url":"https://api.github.com/repos/philbrookes/negotiator/languages","stargazers_url":"https://api.github.com/repos/philbrookes/negotiator/stargazers","contributors_url":"https://api.github.com/repos/philbrookes/negotiator/contributors","subscribers_url":"https://api.github.com/repos/philbrookes/negotiator/subscribers","subscription_url":"https://api.github.com/repos/philbrookes/negotiator/subscription","commits_url":"https://api.github.com/repos/philbrookes/negotiator/commits{/sha}","git_commits_url":"https://api.github.com/repos/philbrookes/negotiator/git/commits{/sha}","comments_url":"https://api.github.com/repos/philbrookes/negotiator/comments{/number}","issue_comment_url":"https://api.github.com/repos/philbrookes/negotiator/issues/comments{/number}","contents_url":"https://api.github.com/repos/philbrookes/negotiator/contents/{+path}","compare_url":"https://api.github.com/repos/philbrookes/negotiator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/philbrookes/negotiator/merges","archive_url":"https://api.github.com/repos/philbrookes/negotiator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/philbrookes/negotiator/downloads","issues_url":"https://api.github.com/repos/philbrookes/negotiator/issues{/number}","pulls_url":"https://api.github.com/repos/philbrookes/negotiator/pulls{/number}","milestones_url":"https://api.github.com/repos/philbrookes/negotiator/milestones{/number}","notifications_url":"https://api.github.com/repos/philbrookes/negotiator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/philbrookes/negotiator/labels{/name}","releases_url":"https://api.github.com/repos/philbrookes/negotiator/releases{/id}","deployments_url":"https://api.github.com/repos/philbrookes/negotiator/deployments","created_at":"2016-11-30T09:52:05Z","updated_at":"2016-11-30T09:52:07Z","pushed_at":"2016-12-07T09:50:37Z","git_url":"git://github.com/philbrookes/negotiator.git","ssh_url":"git@github.com:philbrookes/negotiator.git","clone_url":"https://github.com/philbrookes/negotiator.git","svn_url":"https://github.com/philbrookes/negotiator","homepage":null,"size":67613,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"feedhenry:master","ref":"master","sha":"3a3542dc8659d6dd8b934b09e1673e6224c7e033","user":{"login":"feedhenry","id":772226,"avatar_url":"https://avatars.githubusercontent.com/u/772226?v=3","gravatar_id":"","url":"https://api.github.com/users/feedhenry","html_url":"https://github.com/feedhenry","followers_url":"https://api.github.com/users/feedhenry/followers","following_url":"https://api.github.com/users/feedhenry/following{/other_user}","gists_url":"https://api.github.com/users/feedhenry/gists{/gist_id}","starred_url":"https://api.github.com/users/feedhenry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feedhenry/subscriptions","organizations_url":"https://api.github.com/users/feedhenry/orgs","repos_url":"https://api.github.com/users/feedhenry/repos","events_url":"https://api.github.com/users/feedhenry/events{/privacy}","received_events_url":"https://api.github.com/users/feedhenry/received_events","type":"Organization","site_admin":false},"repo":{"id":74413521,"name":"negotiator","full_name":"feedhenry/negotiator","owner":{"login":"feedhenry","id":772226,"avatar_url":"https://avatars.githubusercontent.com/u/772226?v=3","gravatar_id":"","url":"https://api.github.com/users/feedhenry","html_url":"https://github.com/feedhenry","followers_url":"https://api.github.com/users/feedhenry/followers","following_url":"https://api.github.com/users/feedhenry/following{/other_user}","gists_url":"https://api.github.com/users/feedhenry/gists{/gist_id}","starred_url":"https://api.github.com/users/feedhenry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feedhenry/subscriptions","organizations_url":"https://api.github.com/users/feedhenry/orgs","repos_url":"https://api.github.com/users/feedhenry/repos","events_url":"https://api.github.com/users/feedhenry/events{/privacy}","received_events_url":"https://api.github.com/users/feedhenry/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/feedhenry/negotiator","description":null,"fork":false,"url":"https://api.github.com/repos/feedhenry/negotiator","forks_url":"https://api.github.com/repos/feedhenry/negotiator/forks","keys_url":"https://api.github.com/repos/feedhenry/negotiator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/feedhenry/negotiator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/feedhenry/negotiator/teams","hooks_url":"https://api.github.com/repos/feedhenry/negotiator/hooks","issue_events_url":"https://api.github.com/repos/feedhenry/negotiator/issues/events{/number}","events_url":"https://api.github.com/repos/feedhenry/negotiator/events","assignees_url":"https://api.github.com/repos/feedhenry/negotiator/assignees{/user}","branches_url":"https://api.github.com/repos/feedhenry/negotiator/branches{/branch}","tags_url":"https://api.github.com/repos/feedhenry/negotiator/tags","blobs_url":"https://api.github.com/repos/feedhenry/negotiator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/feedhenry/negotiator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/feedhenry/negotiator/git/refs{/sha}","trees_url":"https://api.github.com/repos/feedhenry/negotiator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/feedhenry/negotiator/statuses/{sha}","languages_url":"https://api.github.com/repos/feedhenry/negotiator/languages","stargazers_url":"https://api.github.com/repos/feedhenry/negotiator/stargazers","contributors_url":"https://api.github.com/repos/feedhenry/negotiator/contributors","subscribers_url":"https://api.github.com/repos/feedhenry/negotiator/subscribers","subscription_url":"https://api.github.com/repos/feedhenry/negotiator/subscription","commits_url":"https://api.github.com/repos/feedhenry/negotiator/commits{/sha}","git_commits_url":"https://api.github.com/repos/feedhenry/negotiator/git/commits{/sha}","comments_url":"https://api.github.com/repos/feedhenry/negotiator/comments{/number}","issue_comment_url":"https://api.github.com/repos/feedhenry/negotiator/issues/comments{/number}","contents_url":"https://api.github.com/repos/feedhenry/negotiator/contents/{+path}","compare_url":"https://api.github.com/repos/feedhenry/negotiator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/feedhenry/negotiator/merges","archive_url":"https://api.github.com/repos/feedhenry/negotiator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/feedhenry/negotiator/downloads","issues_url":"https://api.github.com/repos/feedhenry/negotiator/issues{/number}","pulls_url":"https://api.github.com/repos/feedhenry/negotiator/pulls{/number}","milestones_url":"https://api.github.com/repos/feedhenry/negotiator/milestones{/number}","notifications_url":"https://api.github.com/repos/feedhenry/negotiator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/feedhenry/negotiator/labels{/name}","releases_url":"https://api.github.com/repos/feedhenry/negotiator/releases{/id}","deployments_url":"https://api.github.com/repos/feedhenry/negotiator/deployments","created_at":"2016-11-21T23:00:47Z","updated_at":"2016-11-27T21:29:42Z","pushed_at":"2016-12-07T09:50:38Z","git_url":"git://github.com/feedhenry/negotiator.git","ssh_url":"git@github.com:feedhenry/negotiator.git","clone_url":"https://github.com/feedhenry/negotiator.git","svn_url":"https://github.com/feedhenry/negotiator","homepage":null,"size":67608,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/feedhenry/negotiator/pulls/7"},"html":{"href":"https://github.com/feedhenry/negotiator/pull/7"},"issue":{"href":"https://api.github.com/repos/feedhenry/negotiator/issues/7"},"comments":{"href":"https://api.github.com/repos/feedhenry/negotiator/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/feedhenry/negotiator/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/feedhenry/negotiator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/feedhenry/negotiator/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/feedhenry/negotiator/statuses/152b081b55e19536367c23a44e0421a4e81da2b6"}}}}
{"actor":{"display_login":"philbrookes"}}