{"action":"created","comment":{"url":"https://api.github.com/repos/guardian/composer-restorer/pulls/comments/22947489","id":22947489,"diff_hunk":"@@ -0,0 +1,83 @@\n+package controllers\n+\n+\n+import play.api.mvc._\n+import play.api.libs.json._\n+\n+import scala.concurrent.Future\n+import scala.concurrent.ExecutionContext.Implicits.global\n+import org.joda.time.format.ISODateTimeFormat\n+import org.joda.time.LocalDateTime\n+\n+import models.Template\n+\n+/* Must allow cross origin requests for the templating service */\n+case class CORSable[A](origins: String*)(action: Action[A]) extends Action[A] {","path":"app/controllers/Templates.scala","position":15,"original_position":15,"commit_id":"3389e96190b66f9c1e12b60ad3ecd108194bf6f4","original_commit_id":"78169b2aa1b9c493ed7da5d146c9a66f1183f347","user":{"login":"hmgibson23","id":1932367,"avatar_url":"https://avatars.githubusercontent.com/u/1932367?v=3","gravatar_id":"","url":"https://api.github.com/users/hmgibson23","html_url":"https://github.com/hmgibson23","followers_url":"https://api.github.com/users/hmgibson23/followers","following_url":"https://api.github.com/users/hmgibson23/following{/other_user}","gists_url":"https://api.github.com/users/hmgibson23/gists{/gist_id}","starred_url":"https://api.github.com/users/hmgibson23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmgibson23/subscriptions","organizations_url":"https://api.github.com/users/hmgibson23/orgs","repos_url":"https://api.github.com/users/hmgibson23/repos","events_url":"https://api.github.com/users/hmgibson23/events{/privacy}","received_events_url":"https://api.github.com/users/hmgibson23/received_events","type":"User","site_admin":false},"body":"Good call.","created_at":"2015-01-14T16:17:46Z","updated_at":"2015-01-14T16:17:46Z","html_url":"https://github.com/guardian/composer-restorer/pull/16#discussion_r22947489","pull_request_url":"https://api.github.com/repos/guardian/composer-restorer/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/guardian/composer-restorer/pulls/comments/22947489"},"html":{"href":"https://github.com/guardian/composer-restorer/pull/16#discussion_r22947489"},"pull_request":{"href":"https://api.github.com/repos/guardian/composer-restorer/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/guardian/composer-restorer/pulls/16","id":27356434,"html_url":"https://github.com/guardian/composer-restorer/pull/16","diff_url":"https://github.com/guardian/composer-restorer/pull/16.diff","patch_url":"https://github.com/guardian/composer-restorer/pull/16.patch","issue_url":"https://api.github.com/repos/guardian/composer-restorer/issues/16","number":16,"state":"open","locked":false,"title":"Templates","user":{"login":"hmgibson23","id":1932367,"avatar_url":"https://avatars.githubusercontent.com/u/1932367?v=3","gravatar_id":"","url":"https://api.github.com/users/hmgibson23","html_url":"https://github.com/hmgibson23","followers_url":"https://api.github.com/users/hmgibson23/followers","following_url":"https://api.github.com/users/hmgibson23/following{/other_user}","gists_url":"https://api.github.com/users/hmgibson23/gists{/gist_id}","starred_url":"https://api.github.com/users/hmgibson23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmgibson23/subscriptions","organizations_url":"https://api.github.com/users/hmgibson23/orgs","repos_url":"https://api.github.com/users/hmgibson23/repos","events_url":"https://api.github.com/users/hmgibson23/events{/privacy}","received_events_url":"https://api.github.com/users/hmgibson23/received_events","type":"User","site_admin":false},"body":"This adds basic templating functionality to the app. Currently it's all done over S3 but it could be switched to Mongo if we feel so inclined. A template is just an object with a title, a date and the contentRaw it was passed from composer stored as a string. Storing it as an enormous string seemed easier than porting all the models or defining new ones or whatever.","created_at":"2015-01-14T15:16:00Z","updated_at":"2015-01-14T16:17:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3ad77ed2c9b09aaf0836355b0fd92611f5a1a3a9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/guardian/composer-restorer/pulls/16/commits","review_comments_url":"https://api.github.com/repos/guardian/composer-restorer/pulls/16/comments","review_comment_url":"https://api.github.com/repos/guardian/composer-restorer/pulls/comments/{number}","comments_url":"https://api.github.com/repos/guardian/composer-restorer/issues/16/comments","statuses_url":"https://api.github.com/repos/guardian/composer-restorer/statuses/3389e96190b66f9c1e12b60ad3ecd108194bf6f4","head":{"label":"guardian:hg-templating","ref":"hg-templating","sha":"3389e96190b66f9c1e12b60ad3ecd108194bf6f4","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":26492355,"name":"composer-restorer","full_name":"guardian/composer-restorer","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/composer-restorer","description":"Resurrects dead content","fork":false,"url":"https://api.github.com/repos/guardian/composer-restorer","forks_url":"https://api.github.com/repos/guardian/composer-restorer/forks","keys_url":"https://api.github.com/repos/guardian/composer-restorer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/composer-restorer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/composer-restorer/teams","hooks_url":"https://api.github.com/repos/guardian/composer-restorer/hooks","issue_events_url":"https://api.github.com/repos/guardian/composer-restorer/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/composer-restorer/events","assignees_url":"https://api.github.com/repos/guardian/composer-restorer/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/composer-restorer/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/composer-restorer/tags","blobs_url":"https://api.github.com/repos/guardian/composer-restorer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/composer-restorer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/composer-restorer/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/composer-restorer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/composer-restorer/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/composer-restorer/languages","stargazers_url":"https://api.github.com/repos/guardian/composer-restorer/stargazers","contributors_url":"https://api.github.com/repos/guardian/composer-restorer/contributors","subscribers_url":"https://api.github.com/repos/guardian/composer-restorer/subscribers","subscription_url":"https://api.github.com/repos/guardian/composer-restorer/subscription","commits_url":"https://api.github.com/repos/guardian/composer-restorer/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/composer-restorer/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/composer-restorer/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/composer-restorer/issues/comments/{number}","contents_url":"https://api.github.com/repos/guardian/composer-restorer/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/composer-restorer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/composer-restorer/merges","archive_url":"https://api.github.com/repos/guardian/composer-restorer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/composer-restorer/downloads","issues_url":"https://api.github.com/repos/guardian/composer-restorer/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/composer-restorer/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/composer-restorer/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/composer-restorer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/composer-restorer/labels{/name}","releases_url":"https://api.github.com/repos/guardian/composer-restorer/releases{/id}","created_at":"2014-11-11T16:00:33Z","updated_at":"2015-01-05T17:42:07Z","pushed_at":"2015-01-14T16:12:40Z","git_url":"git://github.com/guardian/composer-restorer.git","ssh_url":"git@github.com:guardian/composer-restorer.git","clone_url":"https://github.com/guardian/composer-restorer.git","svn_url":"https://github.com/guardian/composer-restorer","homepage":null,"size":1972,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"guardian:master","ref":"master","sha":"ccdc63b59f190d0b36e91a3d0da175e0c96bc0da","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":26492355,"name":"composer-restorer","full_name":"guardian/composer-restorer","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/composer-restorer","description":"Resurrects dead content","fork":false,"url":"https://api.github.com/repos/guardian/composer-restorer","forks_url":"https://api.github.com/repos/guardian/composer-restorer/forks","keys_url":"https://api.github.com/repos/guardian/composer-restorer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/composer-restorer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/composer-restorer/teams","hooks_url":"https://api.github.com/repos/guardian/composer-restorer/hooks","issue_events_url":"https://api.github.com/repos/guardian/composer-restorer/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/composer-restorer/events","assignees_url":"https://api.github.com/repos/guardian/composer-restorer/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/composer-restorer/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/composer-restorer/tags","blobs_url":"https://api.github.com/repos/guardian/composer-restorer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/composer-restorer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/composer-restorer/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/composer-restorer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/composer-restorer/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/composer-restorer/languages","stargazers_url":"https://api.github.com/repos/guardian/composer-restorer/stargazers","contributors_url":"https://api.github.com/repos/guardian/composer-restorer/contributors","subscribers_url":"https://api.github.com/repos/guardian/composer-restorer/subscribers","subscription_url":"https://api.github.com/repos/guardian/composer-restorer/subscription","commits_url":"https://api.github.com/repos/guardian/composer-restorer/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/composer-restorer/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/composer-restorer/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/composer-restorer/issues/comments/{number}","contents_url":"https://api.github.com/repos/guardian/composer-restorer/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/composer-restorer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/composer-restorer/merges","archive_url":"https://api.github.com/repos/guardian/composer-restorer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/composer-restorer/downloads","issues_url":"https://api.github.com/repos/guardian/composer-restorer/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/composer-restorer/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/composer-restorer/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/composer-restorer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/composer-restorer/labels{/name}","releases_url":"https://api.github.com/repos/guardian/composer-restorer/releases{/id}","created_at":"2014-11-11T16:00:33Z","updated_at":"2015-01-05T17:42:07Z","pushed_at":"2015-01-14T16:12:40Z","git_url":"git://github.com/guardian/composer-restorer.git","ssh_url":"git@github.com:guardian/composer-restorer.git","clone_url":"https://github.com/guardian/composer-restorer.git","svn_url":"https://github.com/guardian/composer-restorer","homepage":null,"size":1972,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guardian/composer-restorer/pulls/16"},"html":{"href":"https://github.com/guardian/composer-restorer/pull/16"},"issue":{"href":"https://api.github.com/repos/guardian/composer-restorer/issues/16"},"comments":{"href":"https://api.github.com/repos/guardian/composer-restorer/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/guardian/composer-restorer/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/guardian/composer-restorer/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/guardian/composer-restorer/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/guardian/composer-restorer/statuses/3389e96190b66f9c1e12b60ad3ecd108194bf6f4"}}}}