{"action":"created","comment":{"url":"https://api.github.com/repos/watchdogpolska/docker-images/pulls/comments/298808628","pull_request_review_id":256047658,"id":298808628,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI5ODgwODYyOA==","diff_hunk":"@@ -5,39 +5,50 @@ const url = require('url');\n const proxy = httpProxy.createProxyServer({});\n \n const API_URL = process.env.MIXPANEL_API_URL || 'https://api.mixpanel.com';\n+const LIB_HOST = process.env.MIXPANEL_LIB_HOST || 'https://cdn4.mxpnl.com';\n+const LIB_PATH = process.env.MIXPANEL_LIB_PATH || '/libs/mixpanel-2-latest.min.js';\n const PORT = process.env.PORT || 3000;\n const TRUNCATE_URL = process.env.TRUNCATE_URL || '^/mpanel';\n-const parsed_url = url.parse(API_URL);\n \n if (process.env.SENTRY_DSN) {\n     require('@sentry/node').init({ dsn: process.env.SENTRY_DSN });\n }\n \n const server = http.createServer(function(req, res) {\n+    const is_lib_req = req.url === '/mpanel/lib';","path":"mixpanel-proxy/index.js","position":15,"original_position":15,"commit_id":"e1f3afaed9b1f1125e9c16b3a85510d04c569f92","original_commit_id":"e1f3afaed9b1f1125e9c16b3a85510d04c569f92","user":{"login":"ad-m","id":3618479,"node_id":"MDQ6VXNlcjM2MTg0Nzk=","avatar_url":"https://avatars1.githubusercontent.com/u/3618479?v=4","gravatar_id":"","url":"https://api.github.com/users/ad-m","html_url":"https://github.com/ad-m","followers_url":"https://api.github.com/users/ad-m/followers","following_url":"https://api.github.com/users/ad-m/following{/other_user}","gists_url":"https://api.github.com/users/ad-m/gists{/gist_id}","starred_url":"https://api.github.com/users/ad-m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ad-m/subscriptions","organizations_url":"https://api.github.com/users/ad-m/orgs","repos_url":"https://api.github.com/users/ad-m/repos","events_url":"https://api.github.com/users/ad-m/events{/privacy}","received_events_url":"https://api.github.com/users/ad-m/received_events","type":"User","site_admin":false},"body":"Zapisałeś na sztywno element, który jest konfigurowany przez zmienną środowiskową ```TRUNCATE_URL```.","created_at":"2019-06-29T19:09:29Z","updated_at":"2019-06-29T19:09:29Z","html_url":"https://github.com/watchdogpolska/docker-images/pull/13#discussion_r298808628","pull_request_url":"https://api.github.com/repos/watchdogpolska/docker-images/pulls/13","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/watchdogpolska/docker-images/pulls/comments/298808628"},"html":{"href":"https://github.com/watchdogpolska/docker-images/pull/13#discussion_r298808628"},"pull_request":{"href":"https://api.github.com/repos/watchdogpolska/docker-images/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/watchdogpolska/docker-images/pulls/13","id":292487601,"node_id":"MDExOlB1bGxSZXF1ZXN0MjkyNDg3NjAx","html_url":"https://github.com/watchdogpolska/docker-images/pull/13","diff_url":"https://github.com/watchdogpolska/docker-images/pull/13.diff","patch_url":"https://github.com/watchdogpolska/docker-images/pull/13.patch","issue_url":"https://api.github.com/repos/watchdogpolska/docker-images/issues/13","number":13,"state":"open","locked":false,"title":"Mixpanel-proxy image with ability to proxy loading of Mixpanel library.","user":{"login":"dzejkobi","id":8512850,"node_id":"MDQ6VXNlcjg1MTI4NTA=","avatar_url":"https://avatars0.githubusercontent.com/u/8512850?v=4","gravatar_id":"","url":"https://api.github.com/users/dzejkobi","html_url":"https://github.com/dzejkobi","followers_url":"https://api.github.com/users/dzejkobi/followers","following_url":"https://api.github.com/users/dzejkobi/following{/other_user}","gists_url":"https://api.github.com/users/dzejkobi/gists{/gist_id}","starred_url":"https://api.github.com/users/dzejkobi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dzejkobi/subscriptions","organizations_url":"https://api.github.com/users/dzejkobi/orgs","repos_url":"https://api.github.com/users/dzejkobi/repos","events_url":"https://api.github.com/users/dzejkobi/events{/privacy}","received_events_url":"https://api.github.com/users/dzejkobi/received_events","type":"User","site_admin":false},"body":"This is my proposition, although I'm not sure if I'm doing this right, so I'm open for eventual improvements.","created_at":"2019-06-27T15:24:12Z","updated_at":"2019-06-29T19:09:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b065ad18217b94fa7251469fcd1631d2431c75e8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/watchdogpolska/docker-images/pulls/13/commits","review_comments_url":"https://api.github.com/repos/watchdogpolska/docker-images/pulls/13/comments","review_comment_url":"https://api.github.com/repos/watchdogpolska/docker-images/pulls/comments{/number}","comments_url":"https://api.github.com/repos/watchdogpolska/docker-images/issues/13/comments","statuses_url":"https://api.github.com/repos/watchdogpolska/docker-images/statuses/e1f3afaed9b1f1125e9c16b3a85510d04c569f92","head":{"label":"dzejkobi:mixpanel-proxy-lib","ref":"mixpanel-proxy-lib","sha":"e1f3afaed9b1f1125e9c16b3a85510d04c569f92","user":{"login":"dzejkobi","id":8512850,"node_id":"MDQ6VXNlcjg1MTI4NTA=","avatar_url":"https://avatars0.githubusercontent.com/u/8512850?v=4","gravatar_id":"","url":"https://api.github.com/users/dzejkobi","html_url":"https://github.com/dzejkobi","followers_url":"https://api.github.com/users/dzejkobi/followers","following_url":"https://api.github.com/users/dzejkobi/following{/other_user}","gists_url":"https://api.github.com/users/dzejkobi/gists{/gist_id}","starred_url":"https://api.github.com/users/dzejkobi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dzejkobi/subscriptions","organizations_url":"https://api.github.com/users/dzejkobi/orgs","repos_url":"https://api.github.com/users/dzejkobi/repos","events_url":"https://api.github.com/users/dzejkobi/events{/privacy}","received_events_url":"https://api.github.com/users/dzejkobi/received_events","type":"User","site_admin":false},"repo":{"id":194117052,"node_id":"MDEwOlJlcG9zaXRvcnkxOTQxMTcwNTI=","name":"docker-images","full_name":"dzejkobi/docker-images","private":false,"owner":{"login":"dzejkobi","id":8512850,"node_id":"MDQ6VXNlcjg1MTI4NTA=","avatar_url":"https://avatars0.githubusercontent.com/u/8512850?v=4","gravatar_id":"","url":"https://api.github.com/users/dzejkobi","html_url":"https://github.com/dzejkobi","followers_url":"https://api.github.com/users/dzejkobi/followers","following_url":"https://api.github.com/users/dzejkobi/following{/other_user}","gists_url":"https://api.github.com/users/dzejkobi/gists{/gist_id}","starred_url":"https://api.github.com/users/dzejkobi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dzejkobi/subscriptions","organizations_url":"https://api.github.com/users/dzejkobi/orgs","repos_url":"https://api.github.com/users/dzejkobi/repos","events_url":"https://api.github.com/users/dzejkobi/events{/privacy}","received_events_url":"https://api.github.com/users/dzejkobi/received_events","type":"User","site_admin":false},"html_url":"https://github.com/dzejkobi/docker-images","description":"A collection of Dockerfile files for publicly available software operating in the infrastructure of Citizens Network Watchdog Poland.","fork":true,"url":"https://api.github.com/repos/dzejkobi/docker-images","forks_url":"https://api.github.com/repos/dzejkobi/docker-images/forks","keys_url":"https://api.github.com/repos/dzejkobi/docker-images/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dzejkobi/docker-images/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dzejkobi/docker-images/teams","hooks_url":"https://api.github.com/repos/dzejkobi/docker-images/hooks","issue_events_url":"https://api.github.com/repos/dzejkobi/docker-images/issues/events{/number}","events_url":"https://api.github.com/repos/dzejkobi/docker-images/events","assignees_url":"https://api.github.com/repos/dzejkobi/docker-images/assignees{/user}","branches_url":"https://api.github.com/repos/dzejkobi/docker-images/branches{/branch}","tags_url":"https://api.github.com/repos/dzejkobi/docker-images/tags","blobs_url":"https://api.github.com/repos/dzejkobi/docker-images/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dzejkobi/docker-images/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dzejkobi/docker-images/git/refs{/sha}","trees_url":"https://api.github.com/repos/dzejkobi/docker-images/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dzejkobi/docker-images/statuses/{sha}","languages_url":"https://api.github.com/repos/dzejkobi/docker-images/languages","stargazers_url":"https://api.github.com/repos/dzejkobi/docker-images/stargazers","contributors_url":"https://api.github.com/repos/dzejkobi/docker-images/contributors","subscribers_url":"https://api.github.com/repos/dzejkobi/docker-images/subscribers","subscription_url":"https://api.github.com/repos/dzejkobi/docker-images/subscription","commits_url":"https://api.github.com/repos/dzejkobi/docker-images/commits{/sha}","git_commits_url":"https://api.github.com/repos/dzejkobi/docker-images/git/commits{/sha}","comments_url":"https://api.github.com/repos/dzejkobi/docker-images/comments{/number}","issue_comment_url":"https://api.github.com/repos/dzejkobi/docker-images/issues/comments{/number}","contents_url":"https://api.github.com/repos/dzejkobi/docker-images/contents/{+path}","compare_url":"https://api.github.com/repos/dzejkobi/docker-images/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dzejkobi/docker-images/merges","archive_url":"https://api.github.com/repos/dzejkobi/docker-images/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dzejkobi/docker-images/downloads","issues_url":"https://api.github.com/repos/dzejkobi/docker-images/issues{/number}","pulls_url":"https://api.github.com/repos/dzejkobi/docker-images/pulls{/number}","milestones_url":"https://api.github.com/repos/dzejkobi/docker-images/milestones{/number}","notifications_url":"https://api.github.com/repos/dzejkobi/docker-images/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dzejkobi/docker-images/labels{/name}","releases_url":"https://api.github.com/repos/dzejkobi/docker-images/releases{/id}","deployments_url":"https://api.github.com/repos/dzejkobi/docker-images/deployments","created_at":"2019-06-27T15:08:00Z","updated_at":"2019-06-27T15:08:02Z","pushed_at":"2019-06-27T15:18:19Z","git_url":"git://github.com/dzejkobi/docker-images.git","ssh_url":"git@github.com:dzejkobi/docker-images.git","clone_url":"https://github.com/dzejkobi/docker-images.git","svn_url":"https://github.com/dzejkobi/docker-images","homepage":null,"size":71,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"watchdogpolska:master","ref":"master","sha":"485734eb9a4472492d651ed65280af7b3ed6698b","user":{"login":"watchdogpolska","id":12057506,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyMDU3NTA2","avatar_url":"https://avatars3.githubusercontent.com/u/12057506?v=4","gravatar_id":"","url":"https://api.github.com/users/watchdogpolska","html_url":"https://github.com/watchdogpolska","followers_url":"https://api.github.com/users/watchdogpolska/followers","following_url":"https://api.github.com/users/watchdogpolska/following{/other_user}","gists_url":"https://api.github.com/users/watchdogpolska/gists{/gist_id}","starred_url":"https://api.github.com/users/watchdogpolska/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/watchdogpolska/subscriptions","organizations_url":"https://api.github.com/users/watchdogpolska/orgs","repos_url":"https://api.github.com/users/watchdogpolska/repos","events_url":"https://api.github.com/users/watchdogpolska/events{/privacy}","received_events_url":"https://api.github.com/users/watchdogpolska/received_events","type":"Organization","site_admin":false},"repo":{"id":157301522,"node_id":"MDEwOlJlcG9zaXRvcnkxNTczMDE1MjI=","name":"docker-images","full_name":"watchdogpolska/docker-images","private":false,"owner":{"login":"watchdogpolska","id":12057506,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyMDU3NTA2","avatar_url":"https://avatars3.githubusercontent.com/u/12057506?v=4","gravatar_id":"","url":"https://api.github.com/users/watchdogpolska","html_url":"https://github.com/watchdogpolska","followers_url":"https://api.github.com/users/watchdogpolska/followers","following_url":"https://api.github.com/users/watchdogpolska/following{/other_user}","gists_url":"https://api.github.com/users/watchdogpolska/gists{/gist_id}","starred_url":"https://api.github.com/users/watchdogpolska/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/watchdogpolska/subscriptions","organizations_url":"https://api.github.com/users/watchdogpolska/orgs","repos_url":"https://api.github.com/users/watchdogpolska/repos","events_url":"https://api.github.com/users/watchdogpolska/events{/privacy}","received_events_url":"https://api.github.com/users/watchdogpolska/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/watchdogpolska/docker-images","description":"A collection of Dockerfile files for publicly available software operating in the infrastructure of Citizens Network Watchdog Poland.","fork":false,"url":"https://api.github.com/repos/watchdogpolska/docker-images","forks_url":"https://api.github.com/repos/watchdogpolska/docker-images/forks","keys_url":"https://api.github.com/repos/watchdogpolska/docker-images/keys{/key_id}","collaborators_url":"https://api.github.com/repos/watchdogpolska/docker-images/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/watchdogpolska/docker-images/teams","hooks_url":"https://api.github.com/repos/watchdogpolska/docker-images/hooks","issue_events_url":"https://api.github.com/repos/watchdogpolska/docker-images/issues/events{/number}","events_url":"https://api.github.com/repos/watchdogpolska/docker-images/events","assignees_url":"https://api.github.com/repos/watchdogpolska/docker-images/assignees{/user}","branches_url":"https://api.github.com/repos/watchdogpolska/docker-images/branches{/branch}","tags_url":"https://api.github.com/repos/watchdogpolska/docker-images/tags","blobs_url":"https://api.github.com/repos/watchdogpolska/docker-images/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/watchdogpolska/docker-images/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/watchdogpolska/docker-images/git/refs{/sha}","trees_url":"https://api.github.com/repos/watchdogpolska/docker-images/git/trees{/sha}","statuses_url":"https://api.github.com/repos/watchdogpolska/docker-images/statuses/{sha}","languages_url":"https://api.github.com/repos/watchdogpolska/docker-images/languages","stargazers_url":"https://api.github.com/repos/watchdogpolska/docker-images/stargazers","contributors_url":"https://api.github.com/repos/watchdogpolska/docker-images/contributors","subscribers_url":"https://api.github.com/repos/watchdogpolska/docker-images/subscribers","subscription_url":"https://api.github.com/repos/watchdogpolska/docker-images/subscription","commits_url":"https://api.github.com/repos/watchdogpolska/docker-images/commits{/sha}","git_commits_url":"https://api.github.com/repos/watchdogpolska/docker-images/git/commits{/sha}","comments_url":"https://api.github.com/repos/watchdogpolska/docker-images/comments{/number}","issue_comment_url":"https://api.github.com/repos/watchdogpolska/docker-images/issues/comments{/number}","contents_url":"https://api.github.com/repos/watchdogpolska/docker-images/contents/{+path}","compare_url":"https://api.github.com/repos/watchdogpolska/docker-images/compare/{base}...{head}","merges_url":"https://api.github.com/repos/watchdogpolska/docker-images/merges","archive_url":"https://api.github.com/repos/watchdogpolska/docker-images/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/watchdogpolska/docker-images/downloads","issues_url":"https://api.github.com/repos/watchdogpolska/docker-images/issues{/number}","pulls_url":"https://api.github.com/repos/watchdogpolska/docker-images/pulls{/number}","milestones_url":"https://api.github.com/repos/watchdogpolska/docker-images/milestones{/number}","notifications_url":"https://api.github.com/repos/watchdogpolska/docker-images/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/watchdogpolska/docker-images/labels{/name}","releases_url":"https://api.github.com/repos/watchdogpolska/docker-images/releases{/id}","deployments_url":"https://api.github.com/repos/watchdogpolska/docker-images/deployments","created_at":"2018-11-13T01:26:54Z","updated_at":"2019-06-25T15:43:27Z","pushed_at":"2019-06-27T15:24:13Z","git_url":"git://github.com/watchdogpolska/docker-images.git","ssh_url":"git@github.com:watchdogpolska/docker-images.git","clone_url":"https://github.com/watchdogpolska/docker-images.git","svn_url":"https://github.com/watchdogpolska/docker-images","homepage":null,"size":69,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":2,"license":null,"forks":2,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/watchdogpolska/docker-images/pulls/13"},"html":{"href":"https://github.com/watchdogpolska/docker-images/pull/13"},"issue":{"href":"https://api.github.com/repos/watchdogpolska/docker-images/issues/13"},"comments":{"href":"https://api.github.com/repos/watchdogpolska/docker-images/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/watchdogpolska/docker-images/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/watchdogpolska/docker-images/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/watchdogpolska/docker-images/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/watchdogpolska/docker-images/statuses/e1f3afaed9b1f1125e9c16b3a85510d04c569f92"}},"author_association":"NONE"}}
{"actor":{"display_login":"ad-m"}}