{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/firefox-test-tube/pulls/comments/211781500","pull_request_review_id":148277031,"id":211781500,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTc4MTUwMA==","diff_hunk":"@@ -25,9 +25,28 @@ def experiments(request):\n             'slug': d.slug,\n             'name': d.name,\n             'enabled': d.enabled,\n+            'realtime': False,\n             'creationDate': d.created_at.date().isoformat() if d.created_at else None,\n         })\n \n+    # Include real-time experiments in list until they are fully imported.\n+    imported = {d['slug'] for d in data}\n+    experiments = list(\n+        Enrollment.objects.exclude(experiment__in=imported)\n+                          .distinct('experiment')\n+                          .values_list('experiment', flat=True)\n+    )\n+    if experiments:\n+        for exp in experiments:\n+            data.append({\n+                'id': None,\n+                'slug': exp,\n+                'name': None,\n+                'enabled': True,\n+                'realtime': True,\n+                'creationDate': datetime.date.today().isoformat(),","path":"backend/api/views.py","position":23,"original_position":23,"commit_id":"ba9e7b38d175e67d9387969133e482c5c6b45d74","original_commit_id":"ba9e7b38d175e67d9387969133e482c5c6b45d74","user":{"login":"robhudson","id":1106,"node_id":"MDQ6VXNlcjExMDY=","avatar_url":"https://avatars3.githubusercontent.com/u/1106?v=4","gravatar_id":"","url":"https://api.github.com/users/robhudson","html_url":"https://github.com/robhudson","followers_url":"https://api.github.com/users/robhudson/followers","following_url":"https://api.github.com/users/robhudson/following{/other_user}","gists_url":"https://api.github.com/users/robhudson/gists{/gist_id}","starred_url":"https://api.github.com/users/robhudson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robhudson/subscriptions","organizations_url":"https://api.github.com/users/robhudson/orgs","repos_url":"https://api.github.com/users/robhudson/repos","events_url":"https://api.github.com/users/robhudson/events{/privacy}","received_events_url":"https://api.github.com/users/robhudson/received_events","type":"User","site_admin":false},"body":"@spasovski Let me know if any of these defaults will break the front-end?","created_at":"2018-08-21T22:36:50Z","updated_at":"2018-08-21T22:36:51Z","html_url":"https://github.com/mozilla/firefox-test-tube/pull/241#discussion_r211781500","pull_request_url":"https://api.github.com/repos/mozilla/firefox-test-tube/pulls/241","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/mozilla/firefox-test-tube/pulls/comments/211781500"},"html":{"href":"https://github.com/mozilla/firefox-test-tube/pull/241#discussion_r211781500"},"pull_request":{"href":"https://api.github.com/repos/mozilla/firefox-test-tube/pulls/241"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/firefox-test-tube/pulls/241","id":209974911,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5OTc0OTEx","html_url":"https://github.com/mozilla/firefox-test-tube/pull/241","diff_url":"https://github.com/mozilla/firefox-test-tube/pull/241.diff","patch_url":"https://github.com/mozilla/firefox-test-tube/pull/241.patch","issue_url":"https://api.github.com/repos/mozilla/firefox-test-tube/issues/241","number":241,"state":"open","locked":false,"title":"Fix #232 - Include realtime experiments in experiments API","user":{"login":"robhudson","id":1106,"node_id":"MDQ6VXNlcjExMDY=","avatar_url":"https://avatars3.githubusercontent.com/u/1106?v=4","gravatar_id":"","url":"https://api.github.com/users/robhudson","html_url":"https://github.com/robhudson","followers_url":"https://api.github.com/users/robhudson/followers","following_url":"https://api.github.com/users/robhudson/following{/other_user}","gists_url":"https://api.github.com/users/robhudson/gists{/gist_id}","starred_url":"https://api.github.com/users/robhudson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robhudson/subscriptions","organizations_url":"https://api.github.com/users/robhudson/orgs","repos_url":"https://api.github.com/users/robhudson/repos","events_url":"https://api.github.com/users/robhudson/events{/privacy}","received_events_url":"https://api.github.com/users/robhudson/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-08-21T22:35:48Z","updated_at":"2018-08-21T22:36:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1827debcb15bc81aad76208f2913c5da633a0cbc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/firefox-test-tube/pulls/241/commits","review_comments_url":"https://api.github.com/repos/mozilla/firefox-test-tube/pulls/241/comments","review_comment_url":"https://api.github.com/repos/mozilla/firefox-test-tube/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/firefox-test-tube/issues/241/comments","statuses_url":"https://api.github.com/repos/mozilla/firefox-test-tube/statuses/ba9e7b38d175e67d9387969133e482c5c6b45d74","head":{"label":"mozilla:232-realtime-exps-in-api","ref":"232-realtime-exps-in-api","sha":"ba9e7b38d175e67d9387969133e482c5c6b45d74","user":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":101353166,"node_id":"MDEwOlJlcG9zaXRvcnkxMDEzNTMxNjY=","name":"firefox-test-tube","full_name":"mozilla/firefox-test-tube","owner":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/firefox-test-tube","description":null,"fork":false,"url":"https://api.github.com/repos/mozilla/firefox-test-tube","forks_url":"https://api.github.com/repos/mozilla/firefox-test-tube/forks","keys_url":"https://api.github.com/repos/mozilla/firefox-test-tube/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/firefox-test-tube/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/firefox-test-tube/teams","hooks_url":"https://api.github.com/repos/mozilla/firefox-test-tube/hooks","issue_events_url":"https://api.github.com/repos/mozilla/firefox-test-tube/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/firefox-test-tube/events","assignees_url":"https://api.github.com/repos/mozilla/firefox-test-tube/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/firefox-test-tube/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/firefox-test-tube/tags","blobs_url":"https://api.github.com/repos/mozilla/firefox-test-tube/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/firefox-test-tube/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/firefox-test-tube/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/firefox-test-tube/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/firefox-test-tube/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/firefox-test-tube/languages","stargazers_url":"https://api.github.com/repos/mozilla/firefox-test-tube/stargazers","contributors_url":"https://api.github.com/repos/mozilla/firefox-test-tube/contributors","subscribers_url":"https://api.github.com/repos/mozilla/firefox-test-tube/subscribers","subscription_url":"https://api.github.com/repos/mozilla/firefox-test-tube/subscription","commits_url":"https://api.github.com/repos/mozilla/firefox-test-tube/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/firefox-test-tube/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/firefox-test-tube/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/firefox-test-tube/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/firefox-test-tube/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/firefox-test-tube/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/firefox-test-tube/merges","archive_url":"https://api.github.com/repos/mozilla/firefox-test-tube/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/firefox-test-tube/downloads","issues_url":"https://api.github.com/repos/mozilla/firefox-test-tube/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/firefox-test-tube/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/firefox-test-tube/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/firefox-test-tube/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/firefox-test-tube/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/firefox-test-tube/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/firefox-test-tube/deployments","created_at":"2017-08-25T01:37:02Z","updated_at":"2018-08-20T15:24:55Z","pushed_at":"2018-08-21T22:35:49Z","git_url":"git://github.com/mozilla/firefox-test-tube.git","ssh_url":"git@github.com:mozilla/firefox-test-tube.git","clone_url":"https://github.com/mozilla/firefox-test-tube.git","svn_url":"https://github.com/mozilla/firefox-test-tube","homepage":"http://firefox-test-tube.herokuapp.com/","size":2203,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":29,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":7,"open_issues":29,"watchers":2,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"020b10065d9811b53d92cfa1c1e9967f23999727","user":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":101353166,"node_id":"MDEwOlJlcG9zaXRvcnkxMDEzNTMxNjY=","name":"firefox-test-tube","full_name":"mozilla/firefox-test-tube","owner":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/firefox-test-tube","description":null,"fork":false,"url":"https://api.github.com/repos/mozilla/firefox-test-tube","forks_url":"https://api.github.com/repos/mozilla/firefox-test-tube/forks","keys_url":"https://api.github.com/repos/mozilla/firefox-test-tube/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/firefox-test-tube/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/firefox-test-tube/teams","hooks_url":"https://api.github.com/repos/mozilla/firefox-test-tube/hooks","issue_events_url":"https://api.github.com/repos/mozilla/firefox-test-tube/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/firefox-test-tube/events","assignees_url":"https://api.github.com/repos/mozilla/firefox-test-tube/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/firefox-test-tube/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/firefox-test-tube/tags","blobs_url":"https://api.github.com/repos/mozilla/firefox-test-tube/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/firefox-test-tube/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/firefox-test-tube/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/firefox-test-tube/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/firefox-test-tube/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/firefox-test-tube/languages","stargazers_url":"https://api.github.com/repos/mozilla/firefox-test-tube/stargazers","contributors_url":"https://api.github.com/repos/mozilla/firefox-test-tube/contributors","subscribers_url":"https://api.github.com/repos/mozilla/firefox-test-tube/subscribers","subscription_url":"https://api.github.com/repos/mozilla/firefox-test-tube/subscription","commits_url":"https://api.github.com/repos/mozilla/firefox-test-tube/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/firefox-test-tube/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/firefox-test-tube/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/firefox-test-tube/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/firefox-test-tube/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/firefox-test-tube/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/firefox-test-tube/merges","archive_url":"https://api.github.com/repos/mozilla/firefox-test-tube/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/firefox-test-tube/downloads","issues_url":"https://api.github.com/repos/mozilla/firefox-test-tube/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/firefox-test-tube/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/firefox-test-tube/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/firefox-test-tube/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/firefox-test-tube/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/firefox-test-tube/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/firefox-test-tube/deployments","created_at":"2017-08-25T01:37:02Z","updated_at":"2018-08-20T15:24:55Z","pushed_at":"2018-08-21T22:35:49Z","git_url":"git://github.com/mozilla/firefox-test-tube.git","ssh_url":"git@github.com:mozilla/firefox-test-tube.git","clone_url":"https://github.com/mozilla/firefox-test-tube.git","svn_url":"https://github.com/mozilla/firefox-test-tube","homepage":"http://firefox-test-tube.herokuapp.com/","size":2203,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":29,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":7,"open_issues":29,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/firefox-test-tube/pulls/241"},"html":{"href":"https://github.com/mozilla/firefox-test-tube/pull/241"},"issue":{"href":"https://api.github.com/repos/mozilla/firefox-test-tube/issues/241"},"comments":{"href":"https://api.github.com/repos/mozilla/firefox-test-tube/issues/241/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/firefox-test-tube/pulls/241/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/firefox-test-tube/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/firefox-test-tube/pulls/241/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/firefox-test-tube/statuses/ba9e7b38d175e67d9387969133e482c5c6b45d74"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"robhudson"}}