{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/kuma/pulls/comments/22719955","id":22719955,"diff_hunk":"@@ -399,6 +416,15 @@ <h2 class=\"offscreen\">{{ _('Document Tags and Contributors') }}</h2>\n     <menuitem data-action=\"$edit\" label=\"{{_('Edit page')}}\"></menuitem>\n     <menuitem data-action=\"$history\" label=\"{{_('View page history')}}\"></menuitem>\n   </menu>\n+\n+  <!-- embed scrollback widget based on the tags on the page -->\n+  {% set tags = document.tags.all() %}\n+  {% for tag in tags %}\n+    {% if settings.SCROLLBACK_ROOM_MAP[tag.name] and waffle.flag('scrollback_widget') %}\n+      <button class = \"scrollback-button\" onclick='addScrollback(\"{{settings.SCROLLBACK_ROOM_MAP[tag.name]}}\")'> Chat about {{tag.name}} </button>\n+    {% endif %}\n+  {% endfor %}\n+","path":"kuma/wiki/templates/wiki/document.html","position":49,"original_position":49,"commit_id":"1071d895bc3a4f32177e453e827c40c2a18b1367","original_commit_id":"1071d895bc3a4f32177e453e827c40c2a18b1367","user":{"login":"jezdez","id":1610,"avatar_url":"https://avatars.githubusercontent.com/u/1610?v=3","gravatar_id":"","url":"https://api.github.com/users/jezdez","html_url":"https://github.com/jezdez","followers_url":"https://api.github.com/users/jezdez/followers","following_url":"https://api.github.com/users/jezdez/following{/other_user}","gists_url":"https://api.github.com/users/jezdez/gists{/gist_id}","starred_url":"https://api.github.com/users/jezdez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jezdez/subscriptions","organizations_url":"https://api.github.com/users/jezdez/orgs","repos_url":"https://api.github.com/users/jezdez/repos","events_url":"https://api.github.com/users/jezdez/events{/privacy}","received_events_url":"https://api.github.com/users/jezdez/received_events","type":"User","site_admin":false},"body":"I don't understand this block, why do we have to go through the list of document tags if the setting for this only contains one item?\r\n\r\nThe call to `settings.SCROLLBACK_ROOM_MAP[tag.name]` will also raise a KeyError as soon as one of the tags don't match.","created_at":"2015-01-09T15:05:31Z","updated_at":"2015-01-09T15:05:31Z","html_url":"https://github.com/mozilla/kuma/pull/2992#discussion_r22719955","pull_request_url":"https://api.github.com/repos/mozilla/kuma/pulls/2992","_links":{"self":{"href":"https://api.github.com/repos/mozilla/kuma/pulls/comments/22719955"},"html":{"href":"https://github.com/mozilla/kuma/pull/2992#discussion_r22719955"},"pull_request":{"href":"https://api.github.com/repos/mozilla/kuma/pulls/2992"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/kuma/pulls/2992","id":27083062,"html_url":"https://github.com/mozilla/kuma/pull/2992","diff_url":"https://github.com/mozilla/kuma/pull/2992.diff","patch_url":"https://github.com/mozilla/kuma/pull/2992.patch","issue_url":"https://api.github.com/repos/mozilla/kuma/issues/2992","number":2992,"state":"open","locked":false,"title":"Fix bug 747805: Added the scrollback widget to MDN.","user":{"login":"amalantony","id":1932506,"avatar_url":"https://avatars.githubusercontent.com/u/1932506?v=3","gravatar_id":"","url":"https://api.github.com/users/amalantony","html_url":"https://github.com/amalantony","followers_url":"https://api.github.com/users/amalantony/followers","following_url":"https://api.github.com/users/amalantony/following{/other_user}","gists_url":"https://api.github.com/users/amalantony/gists{/gist_id}","starred_url":"https://api.github.com/users/amalantony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amalantony/subscriptions","organizations_url":"https://api.github.com/users/amalantony/orgs","repos_url":"https://api.github.com/users/amalantony/repos","events_url":"https://api.github.com/users/amalantony/events{/privacy}","received_events_url":"https://api.github.com/users/amalantony/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-09T06:53:41Z","updated_at":"2015-01-09T15:05:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c484c99243fdcb7ee6e831d9769452726f5f2d8","assignee":{"login":"groovecoder","id":71928,"avatar_url":"https://avatars.githubusercontent.com/u/71928?v=3","gravatar_id":"","url":"https://api.github.com/users/groovecoder","html_url":"https://github.com/groovecoder","followers_url":"https://api.github.com/users/groovecoder/followers","following_url":"https://api.github.com/users/groovecoder/following{/other_user}","gists_url":"https://api.github.com/users/groovecoder/gists{/gist_id}","starred_url":"https://api.github.com/users/groovecoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/groovecoder/subscriptions","organizations_url":"https://api.github.com/users/groovecoder/orgs","repos_url":"https://api.github.com/users/groovecoder/repos","events_url":"https://api.github.com/users/groovecoder/events{/privacy}","received_events_url":"https://api.github.com/users/groovecoder/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/kuma/pulls/2992/commits","review_comments_url":"https://api.github.com/repos/mozilla/kuma/pulls/2992/comments","review_comment_url":"https://api.github.com/repos/mozilla/kuma/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla/kuma/issues/2992/comments","statuses_url":"https://api.github.com/repos/mozilla/kuma/statuses/1071d895bc3a4f32177e453e827c40c2a18b1367","head":{"label":"amalantony:scrollback-integration","ref":"scrollback-integration","sha":"1071d895bc3a4f32177e453e827c40c2a18b1367","user":{"login":"amalantony","id":1932506,"avatar_url":"https://avatars.githubusercontent.com/u/1932506?v=3","gravatar_id":"","url":"https://api.github.com/users/amalantony","html_url":"https://github.com/amalantony","followers_url":"https://api.github.com/users/amalantony/followers","following_url":"https://api.github.com/users/amalantony/following{/other_user}","gists_url":"https://api.github.com/users/amalantony/gists{/gist_id}","starred_url":"https://api.github.com/users/amalantony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amalantony/subscriptions","organizations_url":"https://api.github.com/users/amalantony/orgs","repos_url":"https://api.github.com/users/amalantony/repos","events_url":"https://api.github.com/users/amalantony/events{/privacy}","received_events_url":"https://api.github.com/users/amalantony/received_events","type":"User","site_admin":false},"repo":{"id":27859567,"name":"kuma","full_name":"amalantony/kuma","owner":{"login":"amalantony","id":1932506,"avatar_url":"https://avatars.githubusercontent.com/u/1932506?v=3","gravatar_id":"","url":"https://api.github.com/users/amalantony","html_url":"https://github.com/amalantony","followers_url":"https://api.github.com/users/amalantony/followers","following_url":"https://api.github.com/users/amalantony/following{/other_user}","gists_url":"https://api.github.com/users/amalantony/gists{/gist_id}","starred_url":"https://api.github.com/users/amalantony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amalantony/subscriptions","organizations_url":"https://api.github.com/users/amalantony/orgs","repos_url":"https://api.github.com/users/amalantony/repos","events_url":"https://api.github.com/users/amalantony/events{/privacy}","received_events_url":"https://api.github.com/users/amalantony/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/amalantony/kuma","description":"The Django project that powers MDN.","fork":true,"url":"https://api.github.com/repos/amalantony/kuma","forks_url":"https://api.github.com/repos/amalantony/kuma/forks","keys_url":"https://api.github.com/repos/amalantony/kuma/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amalantony/kuma/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amalantony/kuma/teams","hooks_url":"https://api.github.com/repos/amalantony/kuma/hooks","issue_events_url":"https://api.github.com/repos/amalantony/kuma/issues/events{/number}","events_url":"https://api.github.com/repos/amalantony/kuma/events","assignees_url":"https://api.github.com/repos/amalantony/kuma/assignees{/user}","branches_url":"https://api.github.com/repos/amalantony/kuma/branches{/branch}","tags_url":"https://api.github.com/repos/amalantony/kuma/tags","blobs_url":"https://api.github.com/repos/amalantony/kuma/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amalantony/kuma/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amalantony/kuma/git/refs{/sha}","trees_url":"https://api.github.com/repos/amalantony/kuma/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amalantony/kuma/statuses/{sha}","languages_url":"https://api.github.com/repos/amalantony/kuma/languages","stargazers_url":"https://api.github.com/repos/amalantony/kuma/stargazers","contributors_url":"https://api.github.com/repos/amalantony/kuma/contributors","subscribers_url":"https://api.github.com/repos/amalantony/kuma/subscribers","subscription_url":"https://api.github.com/repos/amalantony/kuma/subscription","commits_url":"https://api.github.com/repos/amalantony/kuma/commits{/sha}","git_commits_url":"https://api.github.com/repos/amalantony/kuma/git/commits{/sha}","comments_url":"https://api.github.com/repos/amalantony/kuma/comments{/number}","issue_comment_url":"https://api.github.com/repos/amalantony/kuma/issues/comments/{number}","contents_url":"https://api.github.com/repos/amalantony/kuma/contents/{+path}","compare_url":"https://api.github.com/repos/amalantony/kuma/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amalantony/kuma/merges","archive_url":"https://api.github.com/repos/amalantony/kuma/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amalantony/kuma/downloads","issues_url":"https://api.github.com/repos/amalantony/kuma/issues{/number}","pulls_url":"https://api.github.com/repos/amalantony/kuma/pulls{/number}","milestones_url":"https://api.github.com/repos/amalantony/kuma/milestones{/number}","notifications_url":"https://api.github.com/repos/amalantony/kuma/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amalantony/kuma/labels{/name}","releases_url":"https://api.github.com/repos/amalantony/kuma/releases{/id}","created_at":"2014-12-11T07:34:18Z","updated_at":"2014-12-11T07:34:24Z","pushed_at":"2015-01-09T07:01:16Z","git_url":"git://github.com/amalantony/kuma.git","ssh_url":"git@github.com:amalantony/kuma.git","clone_url":"https://github.com/amalantony/kuma.git","svn_url":"https://github.com/amalantony/kuma","homepage":"https://developer.mozilla.org","size":67329,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"mozilla:master","ref":"master","sha":"d261757eb6539410f86a2a3b37c916a20ee6e1de","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","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":1352520,"name":"kuma","full_name":"mozilla/kuma","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","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/kuma","description":"The Django project that powers MDN.","fork":false,"url":"https://api.github.com/repos/mozilla/kuma","forks_url":"https://api.github.com/repos/mozilla/kuma/forks","keys_url":"https://api.github.com/repos/mozilla/kuma/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/kuma/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/kuma/teams","hooks_url":"https://api.github.com/repos/mozilla/kuma/hooks","issue_events_url":"https://api.github.com/repos/mozilla/kuma/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/kuma/events","assignees_url":"https://api.github.com/repos/mozilla/kuma/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/kuma/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/kuma/tags","blobs_url":"https://api.github.com/repos/mozilla/kuma/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/kuma/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/kuma/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/kuma/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/kuma/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/kuma/languages","stargazers_url":"https://api.github.com/repos/mozilla/kuma/stargazers","contributors_url":"https://api.github.com/repos/mozilla/kuma/contributors","subscribers_url":"https://api.github.com/repos/mozilla/kuma/subscribers","subscription_url":"https://api.github.com/repos/mozilla/kuma/subscription","commits_url":"https://api.github.com/repos/mozilla/kuma/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/kuma/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/kuma/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/kuma/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla/kuma/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/kuma/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/kuma/merges","archive_url":"https://api.github.com/repos/mozilla/kuma/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/kuma/downloads","issues_url":"https://api.github.com/repos/mozilla/kuma/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/kuma/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/kuma/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/kuma/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/kuma/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/kuma/releases{/id}","created_at":"2011-02-10T21:48:06Z","updated_at":"2015-01-09T04:26:17Z","pushed_at":"2015-01-08T18:24:55Z","git_url":"git://github.com/mozilla/kuma.git","ssh_url":"git@github.com:mozilla/kuma.git","clone_url":"https://github.com/mozilla/kuma.git","svn_url":"https://github.com/mozilla/kuma","homepage":"https://developer.mozilla.org","size":92431,"stargazers_count":521,"watchers_count":521,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":314,"mirror_url":null,"open_issues_count":8,"forks":314,"open_issues":8,"watchers":521,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/kuma/pulls/2992"},"html":{"href":"https://github.com/mozilla/kuma/pull/2992"},"issue":{"href":"https://api.github.com/repos/mozilla/kuma/issues/2992"},"comments":{"href":"https://api.github.com/repos/mozilla/kuma/issues/2992/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/kuma/pulls/2992/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/kuma/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla/kuma/pulls/2992/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/kuma/statuses/1071d895bc3a4f32177e453e827c40c2a18b1367"}}}}