{"action":"created","comment":{"url":"https://api.github.com/repos/guardian/frontend/pulls/comments/65668926","id":65668926,"diff_hunk":"@@ -1,25 +1,54 @@\n-@(expiringImminently: Seq[conf.switches.Switch], expiringSoon: Seq[conf.switches.Switch])\n+@import conf.switches.Switch\n+@import _root_.jobs.ExpiringSwitches\n \n-@showSwitch(switch: conf.switches.Switch) = {\n-    <li>\n-        <div>@{switch.name}</div>\n-        <div>expires @{switch.sellByDate.get.toString(\"E dd MMM\")} 23:59 UTC</div>\n+@(switches: Seq[Switch])\n+\n+@showSwitch(switch: conf.switches.Switch, showExpirationDate: Boolean) = {\n+    <li style=\"padding-bottom: 6px\">\n+        <div>\n+            <strong>@{switch.name}</strong>\n+            - @showOwners(switch.owners)\n+            @if(showExpirationDate) { - <span style=\"color:grey;font-style: italic;\">expires @{switch.sellByDate.get.toString(\"E dd MMM\")} at 23:59 (London time)</span>}\n+        </div>\n         <div>@{switch.description}</div>","path":"admin/app/views/email/expiringSwitches.scala.html","position":18,"original_position":18,"commit_id":"763fd4467e5253b13b71ac07a039e1b1bf79e6f0","original_commit_id":"5fe7bb14d877487f8791a918b9cfdfdd9b835eaa","user":{"login":"gklopper","id":76709,"avatar_url":"https://avatars.githubusercontent.com/u/76709?v=3","gravatar_id":"","url":"https://api.github.com/users/gklopper","html_url":"https://github.com/gklopper","followers_url":"https://api.github.com/users/gklopper/followers","following_url":"https://api.github.com/users/gklopper/following{/other_user}","gists_url":"https://api.github.com/users/gklopper/gists{/gist_id}","starred_url":"https://api.github.com/users/gklopper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gklopper/subscriptions","organizations_url":"https://api.github.com/users/gklopper/orgs","repos_url":"https://api.github.com/users/gklopper/repos","events_url":"https://api.github.com/users/gklopper/events{/privacy}","received_events_url":"https://api.github.com/users/gklopper/received_events","type":"User","site_admin":false},"body":"You might appreciate the description while trying to figure out which switch to turn off in the middle of the night (I certainly do)","created_at":"2016-06-03T07:53:55Z","updated_at":"2016-06-03T07:53:55Z","html_url":"https://github.com/guardian/frontend/pull/13174#discussion_r65668926","pull_request_url":"https://api.github.com/repos/guardian/frontend/pulls/13174","_links":{"self":{"href":"https://api.github.com/repos/guardian/frontend/pulls/comments/65668926"},"html":{"href":"https://github.com/guardian/frontend/pull/13174#discussion_r65668926"},"pull_request":{"href":"https://api.github.com/repos/guardian/frontend/pulls/13174"}}},"pull_request":{"url":"https://api.github.com/repos/guardian/frontend/pulls/13174","id":72332409,"html_url":"https://github.com/guardian/frontend/pull/13174","diff_url":"https://github.com/guardian/frontend/pull/13174.diff","patch_url":"https://github.com/guardian/frontend/pull/13174.patch","issue_url":"https://api.github.com/repos/guardian/frontend/issues/13174","number":13174,"state":"open","locked":false,"title":"Add switch owner and improve format of the Expiring switches email","user":{"login":"TBonnin","id":233326,"avatar_url":"https://avatars.githubusercontent.com/u/233326?v=3","gravatar_id":"","url":"https://api.github.com/users/TBonnin","html_url":"https://github.com/TBonnin","followers_url":"https://api.github.com/users/TBonnin/followers","following_url":"https://api.github.com/users/TBonnin/following{/other_user}","gists_url":"https://api.github.com/users/TBonnin/gists{/gist_id}","starred_url":"https://api.github.com/users/TBonnin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TBonnin/subscriptions","organizations_url":"https://api.github.com/users/TBonnin/orgs","repos_url":"https://api.github.com/users/TBonnin/repos","events_url":"https://api.github.com/users/TBonnin/events{/privacy}","received_events_url":"https://api.github.com/users/TBonnin/received_events","type":"User","site_admin":false},"body":"## What does this change?\r\nAdd the concept of switch owner as well as improving the formatting of the expiring switch email\r\n\r\nI first thought about using email addresses as switch owners, however because this is a public repo we cannot expose emails directly. It would then require to keep a map of name -> email in the config. That might be an overkill.\r\nI gave up on this idea then and only add the concept of owner, which can be identify by a name (ex: `health team`) and/or a github account)\r\nI used `git blame` to assign already existing switches. I might have made some mistakes (:wink: @johnduffell)\r\nPossible improvement: when a switch is about to expire, automatically open a github issue and assign it to the owner. :)\r\n\r\nSee the screenshot below for the change regarding formatting\r\n\r\nLet me know if you think this could be useful. Thank you\r\n\r\n## What is the value of this and can you measure success?\r\nEasier to spot which switch is about to expire\r\nEasier to spot who is responsible for a given switch that is about to expire\r\n\r\n## Does this affect other platforms - Amp, Apps, etc?\r\nNo\r\n\r\n## Screenshots\r\n![screen shot 2016-06-02 at 12 16 40](https://cloud.githubusercontent.com/assets/233326/15743577/751b98b2-28be-11e6-9c78-71ce134003f0.png)\r\n\r\n## Request for comment\r\n@johnduffell @regiskuckaertz @jamespamplin @JustinPinner @alexduf @rich-nguyen \r\n\r\n<!--\r\n*Does this PR meet the [contributing guidelines](https://github.com/guardian/frontend/blob/issue_pr_templates/.github/CONTRIBUTING.md#submission)?*\r\n-->","created_at":"2016-06-02T11:46:43Z","updated_at":"2016-06-03T07:53:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4e129a5afb3c962ad4ff42e4bb5c37a95e582c39","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/guardian/frontend/pulls/13174/commits","review_comments_url":"https://api.github.com/repos/guardian/frontend/pulls/13174/comments","review_comment_url":"https://api.github.com/repos/guardian/frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/guardian/frontend/issues/13174/comments","statuses_url":"https://api.github.com/repos/guardian/frontend/statuses/763fd4467e5253b13b71ac07a039e1b1bf79e6f0","head":{"label":"guardian:tbonnin-improve-expiring-switches-email","ref":"tbonnin-improve-expiring-switches-email","sha":"763fd4467e5253b13b71ac07a039e1b1bf79e6f0","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":4370755,"name":"frontend","full_name":"guardian/frontend","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/frontend","description":"Source for theguardian.com","fork":false,"url":"https://api.github.com/repos/guardian/frontend","forks_url":"https://api.github.com/repos/guardian/frontend/forks","keys_url":"https://api.github.com/repos/guardian/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/frontend/teams","hooks_url":"https://api.github.com/repos/guardian/frontend/hooks","issue_events_url":"https://api.github.com/repos/guardian/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/frontend/events","assignees_url":"https://api.github.com/repos/guardian/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/frontend/tags","blobs_url":"https://api.github.com/repos/guardian/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/frontend/languages","stargazers_url":"https://api.github.com/repos/guardian/frontend/stargazers","contributors_url":"https://api.github.com/repos/guardian/frontend/contributors","subscribers_url":"https://api.github.com/repos/guardian/frontend/subscribers","subscription_url":"https://api.github.com/repos/guardian/frontend/subscription","commits_url":"https://api.github.com/repos/guardian/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/frontend/merges","archive_url":"https://api.github.com/repos/guardian/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/frontend/downloads","issues_url":"https://api.github.com/repos/guardian/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/frontend/labels{/name}","releases_url":"https://api.github.com/repos/guardian/frontend/releases{/id}","deployments_url":"https://api.github.com/repos/guardian/frontend/deployments","created_at":"2012-05-18T15:39:15Z","updated_at":"2016-06-02T22:25:34Z","pushed_at":"2016-06-02T20:55:42Z","git_url":"git://github.com/guardian/frontend.git","ssh_url":"git@github.com:guardian/frontend.git","clone_url":"https://github.com/guardian/frontend.git","svn_url":"https://github.com/guardian/frontend","homepage":"http://www.theguardian.com","size":482811,"stargazers_count":3208,"watchers_count":3208,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":335,"mirror_url":null,"open_issues_count":52,"forks":335,"open_issues":52,"watchers":3208,"default_branch":"master"}},"base":{"label":"guardian:master","ref":"master","sha":"1bb2beba01f1bce427ecb7088f6cc7f7be04288a","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":4370755,"name":"frontend","full_name":"guardian/frontend","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/frontend","description":"Source for theguardian.com","fork":false,"url":"https://api.github.com/repos/guardian/frontend","forks_url":"https://api.github.com/repos/guardian/frontend/forks","keys_url":"https://api.github.com/repos/guardian/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/frontend/teams","hooks_url":"https://api.github.com/repos/guardian/frontend/hooks","issue_events_url":"https://api.github.com/repos/guardian/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/frontend/events","assignees_url":"https://api.github.com/repos/guardian/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/frontend/tags","blobs_url":"https://api.github.com/repos/guardian/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/frontend/languages","stargazers_url":"https://api.github.com/repos/guardian/frontend/stargazers","contributors_url":"https://api.github.com/repos/guardian/frontend/contributors","subscribers_url":"https://api.github.com/repos/guardian/frontend/subscribers","subscription_url":"https://api.github.com/repos/guardian/frontend/subscription","commits_url":"https://api.github.com/repos/guardian/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/frontend/merges","archive_url":"https://api.github.com/repos/guardian/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/frontend/downloads","issues_url":"https://api.github.com/repos/guardian/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/frontend/labels{/name}","releases_url":"https://api.github.com/repos/guardian/frontend/releases{/id}","deployments_url":"https://api.github.com/repos/guardian/frontend/deployments","created_at":"2012-05-18T15:39:15Z","updated_at":"2016-06-02T22:25:34Z","pushed_at":"2016-06-02T20:55:42Z","git_url":"git://github.com/guardian/frontend.git","ssh_url":"git@github.com:guardian/frontend.git","clone_url":"https://github.com/guardian/frontend.git","svn_url":"https://github.com/guardian/frontend","homepage":"http://www.theguardian.com","size":482811,"stargazers_count":3208,"watchers_count":3208,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":335,"mirror_url":null,"open_issues_count":52,"forks":335,"open_issues":52,"watchers":3208,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guardian/frontend/pulls/13174"},"html":{"href":"https://github.com/guardian/frontend/pull/13174"},"issue":{"href":"https://api.github.com/repos/guardian/frontend/issues/13174"},"comments":{"href":"https://api.github.com/repos/guardian/frontend/issues/13174/comments"},"review_comments":{"href":"https://api.github.com/repos/guardian/frontend/pulls/13174/comments"},"review_comment":{"href":"https://api.github.com/repos/guardian/frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/guardian/frontend/pulls/13174/commits"},"statuses":{"href":"https://api.github.com/repos/guardian/frontend/statuses/763fd4467e5253b13b71ac07a039e1b1bf79e6f0"}}}}
{"actor":{"display_login":"gklopper"}}