{"action":"created","comment":{"url":"https://api.github.com/repos/Wikia/api-gateway/pulls/comments/31765139","id":31765139,"diff_hunk":"@@ -0,0 +1,11 @@\n+{{define \"escape\"}}{{.| regexReplaceAll \"[^a-zA-Z0-9]\" \"_\"}}{{end}}\n+{{range $service := services}}\n+{{range $tag := $service.Tags}}\n+{{ with $serviceQuery := printf \"%s.%s\" $tag $service.Name }}\n+{{ if service $serviceQuery }}\n+upstream {{template \"escape\" $serviceQuery}} {\n+\t{{range service $serviceQuery}}\n+\t\tserver {{.Address}}:{{.Port}};{{end}}\n+}\n+{{end}}","path":"templates/conf/upstreams.conf","position":10,"original_position":10,"commit_id":"b10ba129709f9109c21f94dc9273d4f8074c36d3","original_commit_id":"b10ba129709f9109c21f94dc9273d4f8074c36d3","user":{"login":"drsnyder","id":21621,"avatar_url":"https://avatars.githubusercontent.com/u/21621?v=3","gravatar_id":"","url":"https://api.github.com/users/drsnyder","html_url":"https://github.com/drsnyder","followers_url":"https://api.github.com/users/drsnyder/followers","following_url":"https://api.github.com/users/drsnyder/following{/other_user}","gists_url":"https://api.github.com/users/drsnyder/gists{/gist_id}","starred_url":"https://api.github.com/users/drsnyder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drsnyder/subscriptions","organizations_url":"https://api.github.com/users/drsnyder/orgs","repos_url":"https://api.github.com/users/drsnyder/repos","events_url":"https://api.github.com/users/drsnyder/events{/privacy}","received_events_url":"https://api.github.com/users/drsnyder/received_events","type":"User","site_admin":false},"body":"Will helios be included here? It would be nice to also be able to proxy any helios requests that aren't explicitly matched by the hard coded paths at the top of the nginx config.","created_at":"2015-06-04T21:01:00Z","updated_at":"2015-06-04T21:01:00Z","html_url":"https://github.com/Wikia/api-gateway/pull/16#discussion_r31765139","pull_request_url":"https://api.github.com/repos/Wikia/api-gateway/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/Wikia/api-gateway/pulls/comments/31765139"},"html":{"href":"https://github.com/Wikia/api-gateway/pull/16#discussion_r31765139"},"pull_request":{"href":"https://api.github.com/repos/Wikia/api-gateway/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/Wikia/api-gateway/pulls/16","id":36764495,"html_url":"https://github.com/Wikia/api-gateway/pull/16","diff_url":"https://github.com/Wikia/api-gateway/pull/16.diff","patch_url":"https://github.com/Wikia/api-gateway/pull/16.patch","issue_url":"https://api.github.com/repos/Wikia/api-gateway/issues/16","number":16,"state":"open","locked":false,"title":"Services-326 Implement API gateway routing directly to services instead of HaProxy","user":{"login":"pchojnacki","id":812891,"avatar_url":"https://avatars.githubusercontent.com/u/812891?v=3","gravatar_id":"","url":"https://api.github.com/users/pchojnacki","html_url":"https://github.com/pchojnacki","followers_url":"https://api.github.com/users/pchojnacki/followers","following_url":"https://api.github.com/users/pchojnacki/following{/other_user}","gists_url":"https://api.github.com/users/pchojnacki/gists{/gist_id}","starred_url":"https://api.github.com/users/pchojnacki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pchojnacki/subscriptions","organizations_url":"https://api.github.com/users/pchojnacki/orgs","repos_url":"https://api.github.com/users/pchojnacki/repos","events_url":"https://api.github.com/users/pchojnacki/events{/privacy}","received_events_url":"https://api.github.com/users/pchojnacki/received_events","type":"User","site_admin":false},"body":"First part of the ticket that required implementation of functionality from HaProxy in api gateway.\r\n/cc: @drsnyder @nmonterroso \r\n\r\nThis is not yet chef ready as some paths might be off. but otherwise works on local dev machine","created_at":"2015-06-02T19:23:36Z","updated_at":"2015-06-04T21:01:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b424bbf22106390353549fb011118e9a598fd948","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Wikia/api-gateway/pulls/16/commits","review_comments_url":"https://api.github.com/repos/Wikia/api-gateway/pulls/16/comments","review_comment_url":"https://api.github.com/repos/Wikia/api-gateway/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Wikia/api-gateway/issues/16/comments","statuses_url":"https://api.github.com/repos/Wikia/api-gateway/statuses/b10ba129709f9109c21f94dc9273d4f8074c36d3","head":{"label":"Wikia:services_326","ref":"services_326","sha":"b10ba129709f9109c21f94dc9273d4f8074c36d3","user":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"repo":{"id":33941445,"name":"api-gateway","full_name":"Wikia/api-gateway","owner":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wikia/api-gateway","description":"Wikia API Gateway (nginx+lua)","fork":false,"url":"https://api.github.com/repos/Wikia/api-gateway","forks_url":"https://api.github.com/repos/Wikia/api-gateway/forks","keys_url":"https://api.github.com/repos/Wikia/api-gateway/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wikia/api-gateway/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wikia/api-gateway/teams","hooks_url":"https://api.github.com/repos/Wikia/api-gateway/hooks","issue_events_url":"https://api.github.com/repos/Wikia/api-gateway/issues/events{/number}","events_url":"https://api.github.com/repos/Wikia/api-gateway/events","assignees_url":"https://api.github.com/repos/Wikia/api-gateway/assignees{/user}","branches_url":"https://api.github.com/repos/Wikia/api-gateway/branches{/branch}","tags_url":"https://api.github.com/repos/Wikia/api-gateway/tags","blobs_url":"https://api.github.com/repos/Wikia/api-gateway/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wikia/api-gateway/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wikia/api-gateway/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wikia/api-gateway/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wikia/api-gateway/statuses/{sha}","languages_url":"https://api.github.com/repos/Wikia/api-gateway/languages","stargazers_url":"https://api.github.com/repos/Wikia/api-gateway/stargazers","contributors_url":"https://api.github.com/repos/Wikia/api-gateway/contributors","subscribers_url":"https://api.github.com/repos/Wikia/api-gateway/subscribers","subscription_url":"https://api.github.com/repos/Wikia/api-gateway/subscription","commits_url":"https://api.github.com/repos/Wikia/api-gateway/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wikia/api-gateway/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wikia/api-gateway/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wikia/api-gateway/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wikia/api-gateway/contents/{+path}","compare_url":"https://api.github.com/repos/Wikia/api-gateway/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wikia/api-gateway/merges","archive_url":"https://api.github.com/repos/Wikia/api-gateway/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wikia/api-gateway/downloads","issues_url":"https://api.github.com/repos/Wikia/api-gateway/issues{/number}","pulls_url":"https://api.github.com/repos/Wikia/api-gateway/pulls{/number}","milestones_url":"https://api.github.com/repos/Wikia/api-gateway/milestones{/number}","notifications_url":"https://api.github.com/repos/Wikia/api-gateway/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wikia/api-gateway/labels{/name}","releases_url":"https://api.github.com/repos/Wikia/api-gateway/releases{/id}","created_at":"2015-04-14T15:50:45Z","updated_at":"2015-05-04T15:56:47Z","pushed_at":"2015-06-03T12:27:38Z","git_url":"git://github.com/Wikia/api-gateway.git","ssh_url":"git@github.com:Wikia/api-gateway.git","clone_url":"https://github.com/Wikia/api-gateway.git","svn_url":"https://github.com/Wikia/api-gateway","homepage":"","size":489,"stargazers_count":0,"watchers_count":0,"language":"Lua","has_issues":true,"has_downloads":true,"has_wiki":true,"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":"Wikia:master","ref":"master","sha":"1ef9e15c93a5a822fcc304ee3b161e8d48227a75","user":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"repo":{"id":33941445,"name":"api-gateway","full_name":"Wikia/api-gateway","owner":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wikia/api-gateway","description":"Wikia API Gateway (nginx+lua)","fork":false,"url":"https://api.github.com/repos/Wikia/api-gateway","forks_url":"https://api.github.com/repos/Wikia/api-gateway/forks","keys_url":"https://api.github.com/repos/Wikia/api-gateway/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wikia/api-gateway/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wikia/api-gateway/teams","hooks_url":"https://api.github.com/repos/Wikia/api-gateway/hooks","issue_events_url":"https://api.github.com/repos/Wikia/api-gateway/issues/events{/number}","events_url":"https://api.github.com/repos/Wikia/api-gateway/events","assignees_url":"https://api.github.com/repos/Wikia/api-gateway/assignees{/user}","branches_url":"https://api.github.com/repos/Wikia/api-gateway/branches{/branch}","tags_url":"https://api.github.com/repos/Wikia/api-gateway/tags","blobs_url":"https://api.github.com/repos/Wikia/api-gateway/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wikia/api-gateway/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wikia/api-gateway/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wikia/api-gateway/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wikia/api-gateway/statuses/{sha}","languages_url":"https://api.github.com/repos/Wikia/api-gateway/languages","stargazers_url":"https://api.github.com/repos/Wikia/api-gateway/stargazers","contributors_url":"https://api.github.com/repos/Wikia/api-gateway/contributors","subscribers_url":"https://api.github.com/repos/Wikia/api-gateway/subscribers","subscription_url":"https://api.github.com/repos/Wikia/api-gateway/subscription","commits_url":"https://api.github.com/repos/Wikia/api-gateway/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wikia/api-gateway/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wikia/api-gateway/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wikia/api-gateway/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wikia/api-gateway/contents/{+path}","compare_url":"https://api.github.com/repos/Wikia/api-gateway/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wikia/api-gateway/merges","archive_url":"https://api.github.com/repos/Wikia/api-gateway/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wikia/api-gateway/downloads","issues_url":"https://api.github.com/repos/Wikia/api-gateway/issues{/number}","pulls_url":"https://api.github.com/repos/Wikia/api-gateway/pulls{/number}","milestones_url":"https://api.github.com/repos/Wikia/api-gateway/milestones{/number}","notifications_url":"https://api.github.com/repos/Wikia/api-gateway/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wikia/api-gateway/labels{/name}","releases_url":"https://api.github.com/repos/Wikia/api-gateway/releases{/id}","created_at":"2015-04-14T15:50:45Z","updated_at":"2015-05-04T15:56:47Z","pushed_at":"2015-06-03T12:27:38Z","git_url":"git://github.com/Wikia/api-gateway.git","ssh_url":"git@github.com:Wikia/api-gateway.git","clone_url":"https://github.com/Wikia/api-gateway.git","svn_url":"https://github.com/Wikia/api-gateway","homepage":"","size":489,"stargazers_count":0,"watchers_count":0,"language":"Lua","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Wikia/api-gateway/pulls/16"},"html":{"href":"https://github.com/Wikia/api-gateway/pull/16"},"issue":{"href":"https://api.github.com/repos/Wikia/api-gateway/issues/16"},"comments":{"href":"https://api.github.com/repos/Wikia/api-gateway/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/Wikia/api-gateway/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/Wikia/api-gateway/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Wikia/api-gateway/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/Wikia/api-gateway/statuses/b10ba129709f9109c21f94dc9273d4f8074c36d3"}}}}