{"action":"created","comment":{"url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/comments/68771458","id":68771458,"diff_hunk":"@@ -19,9 +19,12 @@ PanoptesApp = React.createClass\n     geordi: @geordiLogger\n \n   getEnv: ->\n+    shell_env = process.env.NODE_ENV\n     reg = /\\W?env=(\\w+)/\n     browser_env = window?.location?.search?.match(reg)\n-    @state?.env || browser_env?[1] || 'staging'\n+    env = shell_env || browser_env?[1] || 'staging'","path":"app/partials/app.cjsx","position":8,"original_position":8,"commit_id":"01b7dca6a6997c2b99880b7331d707561a097d39","original_commit_id":"01b7dca6a6997c2b99880b7331d707561a097d39","user":{"login":"marten","id":277,"avatar_url":"https://avatars.githubusercontent.com/u/277?v=3","gravatar_id":"","url":"https://api.github.com/users/marten","html_url":"https://github.com/marten","followers_url":"https://api.github.com/users/marten/followers","following_url":"https://api.github.com/users/marten/following{/other_user}","gists_url":"https://api.github.com/users/marten/gists{/gist_id}","starred_url":"https://api.github.com/users/marten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marten/subscriptions","organizations_url":"https://api.github.com/users/marten/orgs","repos_url":"https://api.github.com/users/marten/repos","events_url":"https://api.github.com/users/marten/events{/privacy}","received_events_url":"https://api.github.com/users/marten/received_events","type":"User","site_admin":false},"body":"I do kind of like the `shell_env` but then I'd suggest moving the `?[1]` away from this line, so that you just get `shell_env || browser_env || 'staging'`. Kind of weird if `shell_env` contains a string, but `browser_env` is actually a regex match result.","created_at":"2016-06-28T14:46:55Z","updated_at":"2016-06-28T14:46:55Z","html_url":"https://github.com/zooniverse/Panoptes-Front-End/pull/2749#discussion_r68771458","pull_request_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/2749","_links":{"self":{"href":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/comments/68771458"},"html":{"href":"https://github.com/zooniverse/Panoptes-Front-End/pull/2749#discussion_r68771458"},"pull_request":{"href":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/2749"}}},"pull_request":{"url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/2749","id":75472503,"html_url":"https://github.com/zooniverse/Panoptes-Front-End/pull/2749","diff_url":"https://github.com/zooniverse/Panoptes-Front-End/pull/2749.diff","patch_url":"https://github.com/zooniverse/Panoptes-Front-End/pull/2749.patch","issue_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/2749","number":2749,"state":"open","locked":false,"title":"Correctly get shell environment","user":{"login":"alexbfree","id":1473244,"avatar_url":"https://avatars.githubusercontent.com/u/1473244?v=3","gravatar_id":"","url":"https://api.github.com/users/alexbfree","html_url":"https://github.com/alexbfree","followers_url":"https://api.github.com/users/alexbfree/followers","following_url":"https://api.github.com/users/alexbfree/following{/other_user}","gists_url":"https://api.github.com/users/alexbfree/gists{/gist_id}","starred_url":"https://api.github.com/users/alexbfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexbfree/subscriptions","organizations_url":"https://api.github.com/users/alexbfree/orgs","repos_url":"https://api.github.com/users/alexbfree/repos","events_url":"https://api.github.com/users/alexbfree/events{/privacy}","received_events_url":"https://api.github.com/users/alexbfree/received_events","type":"User","site_admin":false},"body":"Fixes part of #2742 . `@state.env` wasn't being set correctly in PFE when `NODE_ENV` is set at the shell.","created_at":"2016-06-28T12:59:41Z","updated_at":"2016-06-28T14:46:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e431692d4b9c71b896b1a21413e784446da54bc6","assignee":{"login":"marten","id":277,"avatar_url":"https://avatars.githubusercontent.com/u/277?v=3","gravatar_id":"","url":"https://api.github.com/users/marten","html_url":"https://github.com/marten","followers_url":"https://api.github.com/users/marten/followers","following_url":"https://api.github.com/users/marten/following{/other_user}","gists_url":"https://api.github.com/users/marten/gists{/gist_id}","starred_url":"https://api.github.com/users/marten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marten/subscriptions","organizations_url":"https://api.github.com/users/marten/orgs","repos_url":"https://api.github.com/users/marten/repos","events_url":"https://api.github.com/users/marten/events{/privacy}","received_events_url":"https://api.github.com/users/marten/received_events","type":"User","site_admin":false},"assignees":[{"login":"marten","id":277,"avatar_url":"https://avatars.githubusercontent.com/u/277?v=3","gravatar_id":"","url":"https://api.github.com/users/marten","html_url":"https://github.com/marten","followers_url":"https://api.github.com/users/marten/followers","following_url":"https://api.github.com/users/marten/following{/other_user}","gists_url":"https://api.github.com/users/marten/gists{/gist_id}","starred_url":"https://api.github.com/users/marten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marten/subscriptions","organizations_url":"https://api.github.com/users/marten/orgs","repos_url":"https://api.github.com/users/marten/repos","events_url":"https://api.github.com/users/marten/events{/privacy}","received_events_url":"https://api.github.com/users/marten/received_events","type":"User","site_admin":false},{"login":"camallen","id":295329,"avatar_url":"https://avatars.githubusercontent.com/u/295329?v=3","gravatar_id":"","url":"https://api.github.com/users/camallen","html_url":"https://github.com/camallen","followers_url":"https://api.github.com/users/camallen/followers","following_url":"https://api.github.com/users/camallen/following{/other_user}","gists_url":"https://api.github.com/users/camallen/gists{/gist_id}","starred_url":"https://api.github.com/users/camallen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camallen/subscriptions","organizations_url":"https://api.github.com/users/camallen/orgs","repos_url":"https://api.github.com/users/camallen/repos","events_url":"https://api.github.com/users/camallen/events{/privacy}","received_events_url":"https://api.github.com/users/camallen/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/2749/commits","review_comments_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/2749/comments","review_comment_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/2749/comments","statuses_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/statuses/01b7dca6a6997c2b99880b7331d707561a097d39","head":{"label":"alexbfree:fix-state-env-var-on-production","ref":"fix-state-env-var-on-production","sha":"01b7dca6a6997c2b99880b7331d707561a097d39","user":{"login":"alexbfree","id":1473244,"avatar_url":"https://avatars.githubusercontent.com/u/1473244?v=3","gravatar_id":"","url":"https://api.github.com/users/alexbfree","html_url":"https://github.com/alexbfree","followers_url":"https://api.github.com/users/alexbfree/followers","following_url":"https://api.github.com/users/alexbfree/following{/other_user}","gists_url":"https://api.github.com/users/alexbfree/gists{/gist_id}","starred_url":"https://api.github.com/users/alexbfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexbfree/subscriptions","organizations_url":"https://api.github.com/users/alexbfree/orgs","repos_url":"https://api.github.com/users/alexbfree/repos","events_url":"https://api.github.com/users/alexbfree/events{/privacy}","received_events_url":"https://api.github.com/users/alexbfree/received_events","type":"User","site_admin":false},"repo":{"id":49596567,"name":"Panoptes-Front-End","full_name":"alexbfree/Panoptes-Front-End","owner":{"login":"alexbfree","id":1473244,"avatar_url":"https://avatars.githubusercontent.com/u/1473244?v=3","gravatar_id":"","url":"https://api.github.com/users/alexbfree","html_url":"https://github.com/alexbfree","followers_url":"https://api.github.com/users/alexbfree/followers","following_url":"https://api.github.com/users/alexbfree/following{/other_user}","gists_url":"https://api.github.com/users/alexbfree/gists{/gist_id}","starred_url":"https://api.github.com/users/alexbfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexbfree/subscriptions","organizations_url":"https://api.github.com/users/alexbfree/orgs","repos_url":"https://api.github.com/users/alexbfree/repos","events_url":"https://api.github.com/users/alexbfree/events{/privacy}","received_events_url":"https://api.github.com/users/alexbfree/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alexbfree/Panoptes-Front-End","description":"Frontend for zooniverse/Panoptes","fork":true,"url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End","forks_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/forks","keys_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/teams","hooks_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/hooks","issue_events_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/issues/events{/number}","events_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/events","assignees_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/assignees{/user}","branches_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/branches{/branch}","tags_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/tags","blobs_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/statuses/{sha}","languages_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/languages","stargazers_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/stargazers","contributors_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/contributors","subscribers_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/subscribers","subscription_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/subscription","commits_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/issues/comments{/number}","contents_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/contents/{+path}","compare_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/merges","archive_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/downloads","issues_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/issues{/number}","pulls_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/pulls{/number}","milestones_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/milestones{/number}","notifications_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/labels{/name}","releases_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/releases{/id}","deployments_url":"https://api.github.com/repos/alexbfree/Panoptes-Front-End/deployments","created_at":"2016-01-13T19:29:27Z","updated_at":"2016-01-13T19:29:28Z","pushed_at":"2016-06-28T14:14:21Z","git_url":"git://github.com/alexbfree/Panoptes-Front-End.git","ssh_url":"git@github.com:alexbfree/Panoptes-Front-End.git","clone_url":"https://github.com/alexbfree/Panoptes-Front-End.git","svn_url":"https://github.com/alexbfree/Panoptes-Front-End","homepage":"","size":13131,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","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":"zooniverse:master","ref":"master","sha":"fe903812f1b6d9026d4842dcba120890c3b19a3b","user":{"login":"zooniverse","id":106856,"avatar_url":"https://avatars.githubusercontent.com/u/106856?v=3","gravatar_id":"","url":"https://api.github.com/users/zooniverse","html_url":"https://github.com/zooniverse","followers_url":"https://api.github.com/users/zooniverse/followers","following_url":"https://api.github.com/users/zooniverse/following{/other_user}","gists_url":"https://api.github.com/users/zooniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/zooniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zooniverse/subscriptions","organizations_url":"https://api.github.com/users/zooniverse/orgs","repos_url":"https://api.github.com/users/zooniverse/repos","events_url":"https://api.github.com/users/zooniverse/events{/privacy}","received_events_url":"https://api.github.com/users/zooniverse/received_events","type":"Organization","site_admin":false},"repo":{"id":19498290,"name":"Panoptes-Front-End","full_name":"zooniverse/Panoptes-Front-End","owner":{"login":"zooniverse","id":106856,"avatar_url":"https://avatars.githubusercontent.com/u/106856?v=3","gravatar_id":"","url":"https://api.github.com/users/zooniverse","html_url":"https://github.com/zooniverse","followers_url":"https://api.github.com/users/zooniverse/followers","following_url":"https://api.github.com/users/zooniverse/following{/other_user}","gists_url":"https://api.github.com/users/zooniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/zooniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zooniverse/subscriptions","organizations_url":"https://api.github.com/users/zooniverse/orgs","repos_url":"https://api.github.com/users/zooniverse/repos","events_url":"https://api.github.com/users/zooniverse/events{/privacy}","received_events_url":"https://api.github.com/users/zooniverse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zooniverse/Panoptes-Front-End","description":"Front end for zooniverse/Panoptes","fork":false,"url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End","forks_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/forks","keys_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/teams","hooks_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/hooks","issue_events_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/events{/number}","events_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/events","assignees_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/assignees{/user}","branches_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/branches{/branch}","tags_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/tags","blobs_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/git/refs{/sha}","trees_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/statuses/{sha}","languages_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/languages","stargazers_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/stargazers","contributors_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/contributors","subscribers_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/subscribers","subscription_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/subscription","commits_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/commits{/sha}","git_commits_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/git/commits{/sha}","comments_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/comments{/number}","issue_comment_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/comments{/number}","contents_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/contents/{+path}","compare_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/merges","archive_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/downloads","issues_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues{/number}","pulls_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls{/number}","milestones_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/milestones{/number}","notifications_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/labels{/name}","releases_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/releases{/id}","deployments_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/deployments","created_at":"2014-05-06T14:53:43Z","updated_at":"2016-06-27T09:17:39Z","pushed_at":"2016-06-28T14:42:29Z","git_url":"git://github.com/zooniverse/Panoptes-Front-End.git","ssh_url":"git@github.com:zooniverse/Panoptes-Front-End.git","clone_url":"https://github.com/zooniverse/Panoptes-Front-End.git","svn_url":"https://github.com/zooniverse/Panoptes-Front-End","homepage":"","size":27833,"stargazers_count":28,"watchers_count":28,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":398,"forks":30,"open_issues":398,"watchers":28,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/2749"},"html":{"href":"https://github.com/zooniverse/Panoptes-Front-End/pull/2749"},"issue":{"href":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/2749"},"comments":{"href":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/2749/comments"},"review_comments":{"href":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/2749/comments"},"review_comment":{"href":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/2749/commits"},"statuses":{"href":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/statuses/01b7dca6a6997c2b99880b7331d707561a097d39"}}}}
{"actor":{"display_login":"marten"}}