{"action":"created","comment":{"url":"https://api.github.com/repos/Screenly/screenly-ose/pulls/comments/214648119","pull_request_review_id":151748163,"id":214648119,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNDY0ODExOQ==","diff_hunk":"@@ -220,9 +220,15 @@ def template_handle_unicode(value):\n     return unicode(value)\n \n \n-def is_running_in_docker():\n+def is_demo_node():\n     \"\"\"\n-    Check if running in the docker\n+    Check if the environment variable IS_DEMO NODE is set to 1\n     :return: bool\n     \"\"\"\n-    return os.path.isfile('/.dockerenv')\n+    try:\n+        if os.environ['IS_DEMO_NODE'] == '1':","path":"lib/utils.py","position":null,"original_position":13,"commit_id":"8e6e3c3fc86b668dcd4ac9b07e957d36fa283354","original_commit_id":"8e6e3c3fc86b668dcd4ac9b07e957d36fa283354","user":{"login":"vpetersson","id":357664,"node_id":"MDQ6VXNlcjM1NzY2NA==","avatar_url":"https://avatars1.githubusercontent.com/u/357664?v=4","gravatar_id":"","url":"https://api.github.com/users/vpetersson","html_url":"https://github.com/vpetersson","followers_url":"https://api.github.com/users/vpetersson/followers","following_url":"https://api.github.com/users/vpetersson/following{/other_user}","gists_url":"https://api.github.com/users/vpetersson/gists{/gist_id}","starred_url":"https://api.github.com/users/vpetersson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vpetersson/subscriptions","organizations_url":"https://api.github.com/users/vpetersson/orgs","repos_url":"https://api.github.com/users/vpetersson/repos","events_url":"https://api.github.com/users/vpetersson/events{/privacy}","received_events_url":"https://api.github.com/users/vpetersson/received_events","type":"User","site_admin":false},"body":"Use `os.getenv('IS_DEMO_NODE', False)` instead as we want to avoid try/except whenever possible.","created_at":"2018-09-03T10:50:02Z","updated_at":"2018-09-03T10:50:02Z","html_url":"https://github.com/Screenly/screenly-ose/pull/893#discussion_r214648119","pull_request_url":"https://api.github.com/repos/Screenly/screenly-ose/pulls/893","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Screenly/screenly-ose/pulls/comments/214648119"},"html":{"href":"https://github.com/Screenly/screenly-ose/pull/893#discussion_r214648119"},"pull_request":{"href":"https://api.github.com/repos/Screenly/screenly-ose/pulls/893"}}},"pull_request":{"url":"https://api.github.com/repos/Screenly/screenly-ose/pulls/893","id":212696294,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyNjk2Mjk0","html_url":"https://github.com/Screenly/screenly-ose/pull/893","diff_url":"https://github.com/Screenly/screenly-ose/pull/893.diff","patch_url":"https://github.com/Screenly/screenly-ose/pull/893.patch","issue_url":"https://api.github.com/repos/Screenly/screenly-ose/issues/893","number":893,"state":"open","locked":false,"title":"Demo ga","user":{"login":"rusko124","id":17593028,"node_id":"MDQ6VXNlcjE3NTkzMDI4","avatar_url":"https://avatars2.githubusercontent.com/u/17593028?v=4","gravatar_id":"","url":"https://api.github.com/users/rusko124","html_url":"https://github.com/rusko124","followers_url":"https://api.github.com/users/rusko124/followers","following_url":"https://api.github.com/users/rusko124/following{/other_user}","gists_url":"https://api.github.com/users/rusko124/gists{/gist_id}","starred_url":"https://api.github.com/users/rusko124/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rusko124/subscriptions","organizations_url":"https://api.github.com/users/rusko124/orgs","repos_url":"https://api.github.com/users/rusko124/repos","events_url":"https://api.github.com/users/rusko124/events{/privacy}","received_events_url":"https://api.github.com/users/rusko124/received_events","type":"User","site_admin":false},"body":"I added Google analytics if the Screely was launched in the Docker container. This is intended for ose.demo.screenlyapp.com\r\nThe Google Analytics ID is: UA-37846380-3","created_at":"2018-09-03T09:52:32Z","updated_at":"2018-09-03T10:50:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dae50efbdbcaaef7d7b43f6d4ec5bf81b9ba9d66","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Screenly/screenly-ose/pulls/893/commits","review_comments_url":"https://api.github.com/repos/Screenly/screenly-ose/pulls/893/comments","review_comment_url":"https://api.github.com/repos/Screenly/screenly-ose/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Screenly/screenly-ose/issues/893/comments","statuses_url":"https://api.github.com/repos/Screenly/screenly-ose/statuses/8e6e3c3fc86b668dcd4ac9b07e957d36fa283354","head":{"label":"rusko124:demo_ga","ref":"demo_ga","sha":"8e6e3c3fc86b668dcd4ac9b07e957d36fa283354","user":{"login":"rusko124","id":17593028,"node_id":"MDQ6VXNlcjE3NTkzMDI4","avatar_url":"https://avatars2.githubusercontent.com/u/17593028?v=4","gravatar_id":"","url":"https://api.github.com/users/rusko124","html_url":"https://github.com/rusko124","followers_url":"https://api.github.com/users/rusko124/followers","following_url":"https://api.github.com/users/rusko124/following{/other_user}","gists_url":"https://api.github.com/users/rusko124/gists{/gist_id}","starred_url":"https://api.github.com/users/rusko124/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rusko124/subscriptions","organizations_url":"https://api.github.com/users/rusko124/orgs","repos_url":"https://api.github.com/users/rusko124/repos","events_url":"https://api.github.com/users/rusko124/events{/privacy}","received_events_url":"https://api.github.com/users/rusko124/received_events","type":"User","site_admin":false},"repo":{"id":147162568,"node_id":"MDEwOlJlcG9zaXRvcnkxNDcxNjI1Njg=","name":"screenly-ose","full_name":"rusko124/screenly-ose","owner":{"login":"rusko124","id":17593028,"node_id":"MDQ6VXNlcjE3NTkzMDI4","avatar_url":"https://avatars2.githubusercontent.com/u/17593028?v=4","gravatar_id":"","url":"https://api.github.com/users/rusko124","html_url":"https://github.com/rusko124","followers_url":"https://api.github.com/users/rusko124/followers","following_url":"https://api.github.com/users/rusko124/following{/other_user}","gists_url":"https://api.github.com/users/rusko124/gists{/gist_id}","starred_url":"https://api.github.com/users/rusko124/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rusko124/subscriptions","organizations_url":"https://api.github.com/users/rusko124/orgs","repos_url":"https://api.github.com/users/rusko124/repos","events_url":"https://api.github.com/users/rusko124/events{/privacy}","received_events_url":"https://api.github.com/users/rusko124/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rusko124/screenly-ose","description":"Screenly OSE | Digital Signage for the Raspberry Pi","fork":true,"url":"https://api.github.com/repos/rusko124/screenly-ose","forks_url":"https://api.github.com/repos/rusko124/screenly-ose/forks","keys_url":"https://api.github.com/repos/rusko124/screenly-ose/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rusko124/screenly-ose/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rusko124/screenly-ose/teams","hooks_url":"https://api.github.com/repos/rusko124/screenly-ose/hooks","issue_events_url":"https://api.github.com/repos/rusko124/screenly-ose/issues/events{/number}","events_url":"https://api.github.com/repos/rusko124/screenly-ose/events","assignees_url":"https://api.github.com/repos/rusko124/screenly-ose/assignees{/user}","branches_url":"https://api.github.com/repos/rusko124/screenly-ose/branches{/branch}","tags_url":"https://api.github.com/repos/rusko124/screenly-ose/tags","blobs_url":"https://api.github.com/repos/rusko124/screenly-ose/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rusko124/screenly-ose/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rusko124/screenly-ose/git/refs{/sha}","trees_url":"https://api.github.com/repos/rusko124/screenly-ose/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rusko124/screenly-ose/statuses/{sha}","languages_url":"https://api.github.com/repos/rusko124/screenly-ose/languages","stargazers_url":"https://api.github.com/repos/rusko124/screenly-ose/stargazers","contributors_url":"https://api.github.com/repos/rusko124/screenly-ose/contributors","subscribers_url":"https://api.github.com/repos/rusko124/screenly-ose/subscribers","subscription_url":"https://api.github.com/repos/rusko124/screenly-ose/subscription","commits_url":"https://api.github.com/repos/rusko124/screenly-ose/commits{/sha}","git_commits_url":"https://api.github.com/repos/rusko124/screenly-ose/git/commits{/sha}","comments_url":"https://api.github.com/repos/rusko124/screenly-ose/comments{/number}","issue_comment_url":"https://api.github.com/repos/rusko124/screenly-ose/issues/comments{/number}","contents_url":"https://api.github.com/repos/rusko124/screenly-ose/contents/{+path}","compare_url":"https://api.github.com/repos/rusko124/screenly-ose/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rusko124/screenly-ose/merges","archive_url":"https://api.github.com/repos/rusko124/screenly-ose/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rusko124/screenly-ose/downloads","issues_url":"https://api.github.com/repos/rusko124/screenly-ose/issues{/number}","pulls_url":"https://api.github.com/repos/rusko124/screenly-ose/pulls{/number}","milestones_url":"https://api.github.com/repos/rusko124/screenly-ose/milestones{/number}","notifications_url":"https://api.github.com/repos/rusko124/screenly-ose/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rusko124/screenly-ose/labels{/name}","releases_url":"https://api.github.com/repos/rusko124/screenly-ose/releases{/id}","deployments_url":"https://api.github.com/repos/rusko124/screenly-ose/deployments","created_at":"2018-09-03T06:42:49Z","updated_at":"2018-09-03T06:42:51Z","pushed_at":"2018-09-03T10:39:49Z","git_url":"git://github.com/rusko124/screenly-ose.git","ssh_url":"git@github.com:rusko124/screenly-ose.git","clone_url":"https://github.com/rusko124/screenly-ose.git","svn_url":"https://github.com/rusko124/screenly-ose","homepage":"https://www.screenly.io/ose","size":3737,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Screenly:master","ref":"master","sha":"db47e16d57046d4f97bcb6a9c1e858c8cf9140dd","user":{"login":"Screenly","id":20972724,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwOTcyNzI0","avatar_url":"https://avatars0.githubusercontent.com/u/20972724?v=4","gravatar_id":"","url":"https://api.github.com/users/Screenly","html_url":"https://github.com/Screenly","followers_url":"https://api.github.com/users/Screenly/followers","following_url":"https://api.github.com/users/Screenly/following{/other_user}","gists_url":"https://api.github.com/users/Screenly/gists{/gist_id}","starred_url":"https://api.github.com/users/Screenly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Screenly/subscriptions","organizations_url":"https://api.github.com/users/Screenly/orgs","repos_url":"https://api.github.com/users/Screenly/repos","events_url":"https://api.github.com/users/Screenly/events{/privacy}","received_events_url":"https://api.github.com/users/Screenly/received_events","type":"Organization","site_admin":false},"repo":{"id":5169716,"node_id":"MDEwOlJlcG9zaXRvcnk1MTY5NzE2","name":"screenly-ose","full_name":"Screenly/screenly-ose","owner":{"login":"Screenly","id":20972724,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwOTcyNzI0","avatar_url":"https://avatars0.githubusercontent.com/u/20972724?v=4","gravatar_id":"","url":"https://api.github.com/users/Screenly","html_url":"https://github.com/Screenly","followers_url":"https://api.github.com/users/Screenly/followers","following_url":"https://api.github.com/users/Screenly/following{/other_user}","gists_url":"https://api.github.com/users/Screenly/gists{/gist_id}","starred_url":"https://api.github.com/users/Screenly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Screenly/subscriptions","organizations_url":"https://api.github.com/users/Screenly/orgs","repos_url":"https://api.github.com/users/Screenly/repos","events_url":"https://api.github.com/users/Screenly/events{/privacy}","received_events_url":"https://api.github.com/users/Screenly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Screenly/screenly-ose","description":"Screenly OSE | Digital Signage for the Raspberry Pi","fork":false,"url":"https://api.github.com/repos/Screenly/screenly-ose","forks_url":"https://api.github.com/repos/Screenly/screenly-ose/forks","keys_url":"https://api.github.com/repos/Screenly/screenly-ose/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Screenly/screenly-ose/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Screenly/screenly-ose/teams","hooks_url":"https://api.github.com/repos/Screenly/screenly-ose/hooks","issue_events_url":"https://api.github.com/repos/Screenly/screenly-ose/issues/events{/number}","events_url":"https://api.github.com/repos/Screenly/screenly-ose/events","assignees_url":"https://api.github.com/repos/Screenly/screenly-ose/assignees{/user}","branches_url":"https://api.github.com/repos/Screenly/screenly-ose/branches{/branch}","tags_url":"https://api.github.com/repos/Screenly/screenly-ose/tags","blobs_url":"https://api.github.com/repos/Screenly/screenly-ose/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Screenly/screenly-ose/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Screenly/screenly-ose/git/refs{/sha}","trees_url":"https://api.github.com/repos/Screenly/screenly-ose/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Screenly/screenly-ose/statuses/{sha}","languages_url":"https://api.github.com/repos/Screenly/screenly-ose/languages","stargazers_url":"https://api.github.com/repos/Screenly/screenly-ose/stargazers","contributors_url":"https://api.github.com/repos/Screenly/screenly-ose/contributors","subscribers_url":"https://api.github.com/repos/Screenly/screenly-ose/subscribers","subscription_url":"https://api.github.com/repos/Screenly/screenly-ose/subscription","commits_url":"https://api.github.com/repos/Screenly/screenly-ose/commits{/sha}","git_commits_url":"https://api.github.com/repos/Screenly/screenly-ose/git/commits{/sha}","comments_url":"https://api.github.com/repos/Screenly/screenly-ose/comments{/number}","issue_comment_url":"https://api.github.com/repos/Screenly/screenly-ose/issues/comments{/number}","contents_url":"https://api.github.com/repos/Screenly/screenly-ose/contents/{+path}","compare_url":"https://api.github.com/repos/Screenly/screenly-ose/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Screenly/screenly-ose/merges","archive_url":"https://api.github.com/repos/Screenly/screenly-ose/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Screenly/screenly-ose/downloads","issues_url":"https://api.github.com/repos/Screenly/screenly-ose/issues{/number}","pulls_url":"https://api.github.com/repos/Screenly/screenly-ose/pulls{/number}","milestones_url":"https://api.github.com/repos/Screenly/screenly-ose/milestones{/number}","notifications_url":"https://api.github.com/repos/Screenly/screenly-ose/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Screenly/screenly-ose/labels{/name}","releases_url":"https://api.github.com/repos/Screenly/screenly-ose/releases{/id}","deployments_url":"https://api.github.com/repos/Screenly/screenly-ose/deployments","created_at":"2012-07-24T18:48:50Z","updated_at":"2018-08-29T23:11:53Z","pushed_at":"2018-09-03T10:39:50Z","git_url":"git://github.com/Screenly/screenly-ose.git","ssh_url":"git@github.com:Screenly/screenly-ose.git","clone_url":"https://github.com/Screenly/screenly-ose.git","svn_url":"https://github.com/Screenly/screenly-ose","homepage":"https://www.screenly.io/ose","size":3768,"stargazers_count":617,"watchers_count":617,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":306,"mirror_url":null,"archived":false,"open_issues_count":72,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":306,"open_issues":72,"watchers":617,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Screenly/screenly-ose/pulls/893"},"html":{"href":"https://github.com/Screenly/screenly-ose/pull/893"},"issue":{"href":"https://api.github.com/repos/Screenly/screenly-ose/issues/893"},"comments":{"href":"https://api.github.com/repos/Screenly/screenly-ose/issues/893/comments"},"review_comments":{"href":"https://api.github.com/repos/Screenly/screenly-ose/pulls/893/comments"},"review_comment":{"href":"https://api.github.com/repos/Screenly/screenly-ose/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Screenly/screenly-ose/pulls/893/commits"},"statuses":{"href":"https://api.github.com/repos/Screenly/screenly-ose/statuses/8e6e3c3fc86b668dcd4ac9b07e957d36fa283354"}},"author_association":"NONE"}}
{"actor":{"display_login":"vpetersson"}}