{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/bedrock/pulls/comments/185682425","pull_request_review_id":117118308,"id":185682425,"diff_hunk":"@@ -555,14 +557,23 @@ def new(request):\n                 template = 'firefox/new/portland/scene1-fast.html'\n             elif experience == 'portland-safe':\n                 template = 'firefox/new/portland/scene1-safe.html'\n+            elif experience == 'forgood':\n+                context['portland_variation'] = 'portland-v-forgood'\n+                template = 'firefox/new/portland/scene1.html'\n+            elif experience == 'fast':\n+                context['portland_variation'] = 'portland-fast-v-fast'\n+                template = 'firefox/new/portland/scene1-fast.html'\n+            elif experience == 'safe':\n+                context['portland_variation'] = 'portland-safe-v-safe'\n+                template = 'firefox/new/portland/scene1-safe.html'\n             else:\n                 template = 'firefox/new/scene1.html'\n         else:\n             template = 'firefox/new/scene1.html'\n \n     # no harm done by passing 'v' to template, even when no experiment is running\n     # (also makes tests easier to maintain by always sending a context)\n-    return l10n_utils.render(request, template, {'v': variant})\n+    return l10n_utils.render(request, template, context)","path":"bedrock/firefox/views.py","position":45,"original_position":45,"commit_id":"701aa0abf538e10864f9f76b761cebae84917b15","original_commit_id":"701aa0abf538e10864f9f76b761cebae84917b15","user":{"login":"jpetto","id":317532,"avatar_url":"https://avatars3.githubusercontent.com/u/317532?v=4","gravatar_id":"","url":"https://api.github.com/users/jpetto","html_url":"https://github.com/jpetto","followers_url":"https://api.github.com/users/jpetto/followers","following_url":"https://api.github.com/users/jpetto/following{/other_user}","gists_url":"https://api.github.com/users/jpetto/gists{/gist_id}","starred_url":"https://api.github.com/users/jpetto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpetto/subscriptions","organizations_url":"https://api.github.com/users/jpetto/orgs","repos_url":"https://api.github.com/users/jpetto/repos","events_url":"https://api.github.com/users/jpetto/events{/privacy}","received_events_url":"https://api.github.com/users/jpetto/received_events","type":"User","site_admin":false},"body":"We could be a bit cleaner by passing the pre-defined `experience` in `context`:\r\n\r\n`return l10n_utils.render(request, template, {'experience': experience})`\r\n\r\nThis would eliminate the rather repetitive calls if the `elif` chain, and give us consistency in the JS selectors (which would need updating along with the variable name in the templates).","created_at":"2018-05-03T01:33:33Z","updated_at":"2018-05-03T01:35:44Z","html_url":"https://github.com/mozilla/bedrock/pull/5619#discussion_r185682425","pull_request_url":"https://api.github.com/repos/mozilla/bedrock/pulls/5619","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/mozilla/bedrock/pulls/comments/185682425"},"html":{"href":"https://github.com/mozilla/bedrock/pull/5619#discussion_r185682425"},"pull_request":{"href":"https://api.github.com/repos/mozilla/bedrock/pulls/5619"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/bedrock/pulls/5619","id":185576738,"html_url":"https://github.com/mozilla/bedrock/pull/5619","diff_url":"https://github.com/mozilla/bedrock/pull/5619.diff","patch_url":"https://github.com/mozilla/bedrock/pull/5619.patch","issue_url":"https://api.github.com/repos/mozilla/bedrock/issues/5619","number":5619,"state":"open","locked":false,"title":"Fix Bug 1458389: Added additional portland variants.","user":{"login":"bensternthal","id":198507,"avatar_url":"https://avatars0.githubusercontent.com/u/198507?v=4","gravatar_id":"","url":"https://api.github.com/users/bensternthal","html_url":"https://github.com/bensternthal","followers_url":"https://api.github.com/users/bensternthal/followers","following_url":"https://api.github.com/users/bensternthal/following{/other_user}","gists_url":"https://api.github.com/users/bensternthal/gists{/gist_id}","starred_url":"https://api.github.com/users/bensternthal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bensternthal/subscriptions","organizations_url":"https://api.github.com/users/bensternthal/orgs","repos_url":"https://api.github.com/users/bensternthal/repos","events_url":"https://api.github.com/users/bensternthal/events{/privacy}","received_events_url":"https://api.github.com/users/bensternthal/received_events","type":"User","site_admin":false},"body":"## Description\r\nThis PR enables the following new URLs to render the 3 portland variations:\r\n\r\nhttps://www.mozilla.org/en-US/firefox/new/?xv=forgood\r\nhttps://www.mozilla.org/en-US/firefox/new/?xv=safe\r\nhttps://www.mozilla.org/en-US/firefox/new/?xv=fast\r\n\r\nNew adjust links were also added for each.\r\n\r\n## Issue / Bugzilla link\r\nhttps://bugzilla.mozilla.org/show_bug.cgi?id=1458389\r\n\r\n## Testing\r\nThe 3 urls should all render the same content as their existing _siblings_:\r\nportland=forgood\r\nportland-safe=safe\r\nportland-fast=fast\r\n\r\nA few things in this PR to pay attention to.\r\n\r\n1. I rarely code these days so ...\r\n2. Because the urls provided by fabio were not great (example \"fast\") I did my best with the classnames for handling adjust and avoiding any possible conflict. \r\n3. I am setting a var in context to accomplish the above.. im not 100% sure about the previous usage of context here so take a close look.\r\n4. If we are doing more variations like this we should think about a better implementation. \r\n\r\n","created_at":"2018-05-02T22:22:57Z","updated_at":"2018-05-03T01:35:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c3010580e4b8bc820481aa48f1929520cbd69cfa","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/bedrock/pulls/5619/commits","review_comments_url":"https://api.github.com/repos/mozilla/bedrock/pulls/5619/comments","review_comment_url":"https://api.github.com/repos/mozilla/bedrock/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/bedrock/issues/5619/comments","statuses_url":"https://api.github.com/repos/mozilla/bedrock/statuses/701aa0abf538e10864f9f76b761cebae84917b15","head":{"label":"bensternthal:1458037-Dupe-New-Variations","ref":"1458037-Dupe-New-Variations","sha":"701aa0abf538e10864f9f76b761cebae84917b15","user":{"login":"bensternthal","id":198507,"avatar_url":"https://avatars0.githubusercontent.com/u/198507?v=4","gravatar_id":"","url":"https://api.github.com/users/bensternthal","html_url":"https://github.com/bensternthal","followers_url":"https://api.github.com/users/bensternthal/followers","following_url":"https://api.github.com/users/bensternthal/following{/other_user}","gists_url":"https://api.github.com/users/bensternthal/gists{/gist_id}","starred_url":"https://api.github.com/users/bensternthal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bensternthal/subscriptions","organizations_url":"https://api.github.com/users/bensternthal/orgs","repos_url":"https://api.github.com/users/bensternthal/repos","events_url":"https://api.github.com/users/bensternthal/events{/privacy}","received_events_url":"https://api.github.com/users/bensternthal/received_events","type":"User","site_admin":false},"repo":{"id":5890061,"name":"bedrock","full_name":"bensternthal/bedrock","owner":{"login":"bensternthal","id":198507,"avatar_url":"https://avatars0.githubusercontent.com/u/198507?v=4","gravatar_id":"","url":"https://api.github.com/users/bensternthal","html_url":"https://github.com/bensternthal","followers_url":"https://api.github.com/users/bensternthal/followers","following_url":"https://api.github.com/users/bensternthal/following{/other_user}","gists_url":"https://api.github.com/users/bensternthal/gists{/gist_id}","starred_url":"https://api.github.com/users/bensternthal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bensternthal/subscriptions","organizations_url":"https://api.github.com/users/bensternthal/orgs","repos_url":"https://api.github.com/users/bensternthal/repos","events_url":"https://api.github.com/users/bensternthal/events{/privacy}","received_events_url":"https://api.github.com/users/bensternthal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bensternthal/bedrock","description":"Making mozilla.org awesome, one pebble at a time","fork":true,"url":"https://api.github.com/repos/bensternthal/bedrock","forks_url":"https://api.github.com/repos/bensternthal/bedrock/forks","keys_url":"https://api.github.com/repos/bensternthal/bedrock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bensternthal/bedrock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bensternthal/bedrock/teams","hooks_url":"https://api.github.com/repos/bensternthal/bedrock/hooks","issue_events_url":"https://api.github.com/repos/bensternthal/bedrock/issues/events{/number}","events_url":"https://api.github.com/repos/bensternthal/bedrock/events","assignees_url":"https://api.github.com/repos/bensternthal/bedrock/assignees{/user}","branches_url":"https://api.github.com/repos/bensternthal/bedrock/branches{/branch}","tags_url":"https://api.github.com/repos/bensternthal/bedrock/tags","blobs_url":"https://api.github.com/repos/bensternthal/bedrock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bensternthal/bedrock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bensternthal/bedrock/git/refs{/sha}","trees_url":"https://api.github.com/repos/bensternthal/bedrock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bensternthal/bedrock/statuses/{sha}","languages_url":"https://api.github.com/repos/bensternthal/bedrock/languages","stargazers_url":"https://api.github.com/repos/bensternthal/bedrock/stargazers","contributors_url":"https://api.github.com/repos/bensternthal/bedrock/contributors","subscribers_url":"https://api.github.com/repos/bensternthal/bedrock/subscribers","subscription_url":"https://api.github.com/repos/bensternthal/bedrock/subscription","commits_url":"https://api.github.com/repos/bensternthal/bedrock/commits{/sha}","git_commits_url":"https://api.github.com/repos/bensternthal/bedrock/git/commits{/sha}","comments_url":"https://api.github.com/repos/bensternthal/bedrock/comments{/number}","issue_comment_url":"https://api.github.com/repos/bensternthal/bedrock/issues/comments{/number}","contents_url":"https://api.github.com/repos/bensternthal/bedrock/contents/{+path}","compare_url":"https://api.github.com/repos/bensternthal/bedrock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bensternthal/bedrock/merges","archive_url":"https://api.github.com/repos/bensternthal/bedrock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bensternthal/bedrock/downloads","issues_url":"https://api.github.com/repos/bensternthal/bedrock/issues{/number}","pulls_url":"https://api.github.com/repos/bensternthal/bedrock/pulls{/number}","milestones_url":"https://api.github.com/repos/bensternthal/bedrock/milestones{/number}","notifications_url":"https://api.github.com/repos/bensternthal/bedrock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bensternthal/bedrock/labels{/name}","releases_url":"https://api.github.com/repos/bensternthal/bedrock/releases{/id}","deployments_url":"https://api.github.com/repos/bensternthal/bedrock/deployments","created_at":"2012-09-20T17:14:38Z","updated_at":"2015-07-16T17:11:36Z","pushed_at":"2018-05-02T22:15:26Z","git_url":"git://github.com/bensternthal/bedrock.git","ssh_url":"git@github.com:bensternthal/bedrock.git","clone_url":"https://github.com/bensternthal/bedrock.git","svn_url":"https://github.com/bensternthal/bedrock","homepage":"http://mozilla.org","size":440915,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"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"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"e26031301eb09cb4582b0ff729dd97e875aaa8f7","user":{"login":"mozilla","id":131524,"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":1616665,"name":"bedrock","full_name":"mozilla/bedrock","owner":{"login":"mozilla","id":131524,"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/bedrock","description":"Making mozilla.org awesome, one pebble at a time","fork":false,"url":"https://api.github.com/repos/mozilla/bedrock","forks_url":"https://api.github.com/repos/mozilla/bedrock/forks","keys_url":"https://api.github.com/repos/mozilla/bedrock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/bedrock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/bedrock/teams","hooks_url":"https://api.github.com/repos/mozilla/bedrock/hooks","issue_events_url":"https://api.github.com/repos/mozilla/bedrock/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/bedrock/events","assignees_url":"https://api.github.com/repos/mozilla/bedrock/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/bedrock/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/bedrock/tags","blobs_url":"https://api.github.com/repos/mozilla/bedrock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/bedrock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/bedrock/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/bedrock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/bedrock/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/bedrock/languages","stargazers_url":"https://api.github.com/repos/mozilla/bedrock/stargazers","contributors_url":"https://api.github.com/repos/mozilla/bedrock/contributors","subscribers_url":"https://api.github.com/repos/mozilla/bedrock/subscribers","subscription_url":"https://api.github.com/repos/mozilla/bedrock/subscription","commits_url":"https://api.github.com/repos/mozilla/bedrock/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/bedrock/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/bedrock/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/bedrock/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/bedrock/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/bedrock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/bedrock/merges","archive_url":"https://api.github.com/repos/mozilla/bedrock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/bedrock/downloads","issues_url":"https://api.github.com/repos/mozilla/bedrock/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/bedrock/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/bedrock/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/bedrock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/bedrock/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/bedrock/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/bedrock/deployments","created_at":"2011-04-14T22:57:57Z","updated_at":"2018-05-02T15:24:17Z","pushed_at":"2018-05-02T23:58:36Z","git_url":"git://github.com/mozilla/bedrock.git","ssh_url":"git@github.com:mozilla/bedrock.git","clone_url":"https://github.com/mozilla/bedrock.git","svn_url":"https://github.com/mozilla/bedrock","homepage":"https://www.mozilla.org","size":452851,"stargazers_count":626,"watchers_count":626,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":683,"mirror_url":null,"archived":false,"open_issues_count":27,"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"},"forks":683,"open_issues":27,"watchers":626,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/bedrock/pulls/5619"},"html":{"href":"https://github.com/mozilla/bedrock/pull/5619"},"issue":{"href":"https://api.github.com/repos/mozilla/bedrock/issues/5619"},"comments":{"href":"https://api.github.com/repos/mozilla/bedrock/issues/5619/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/bedrock/pulls/5619/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/bedrock/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/bedrock/pulls/5619/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/bedrock/statuses/701aa0abf538e10864f9f76b761cebae84917b15"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"jpetto"}}