{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/notifications-api/pulls/comments/67836241","id":67836241,"diff_hunk":"@@ -347,6 +350,18 @@ class Notification(db.Model):\n     status = db.Column(\n         db.Enum(*NOTIFICATION_STATUS_TYPES, name='notify_status_types'), nullable=False, default='sending')\n     reference = db.Column(db.String, nullable=True, index=True)\n+    _personalisation = db.Column(db.String, nullable=True)","path":"app/models.py","position":16,"original_position":16,"commit_id":"731bb19a9c566fcde4ae2862d80a861866c8727b","original_commit_id":"731bb19a9c566fcde4ae2862d80a861866c8727b","user":{"login":"ashimali","id":666250,"avatar_url":"https://avatars.githubusercontent.com/u/666250?v=3","gravatar_id":"","url":"https://api.github.com/users/ashimali","html_url":"https://github.com/ashimali","followers_url":"https://api.github.com/users/ashimali/followers","following_url":"https://api.github.com/users/ashimali/following{/other_user}","gists_url":"https://api.github.com/users/ashimali/gists{/gist_id}","starred_url":"https://api.github.com/users/ashimali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashimali/subscriptions","organizations_url":"https://api.github.com/users/ashimali/orgs","repos_url":"https://api.github.com/users/ashimali/repos","events_url":"https://api.github.com/users/ashimali/events{/privacy}","received_events_url":"https://api.github.com/users/ashimali/received_events","type":"User","site_admin":false},"body":"We've left other _ prefixed properties as is for other models, and I don't think it's a egregious situation.","created_at":"2016-06-21T09:29:38Z","updated_at":"2016-06-21T09:29:38Z","html_url":"https://github.com/alphagov/notifications-api/pull/454#discussion_r67836241","pull_request_url":"https://api.github.com/repos/alphagov/notifications-api/pulls/454","_links":{"self":{"href":"https://api.github.com/repos/alphagov/notifications-api/pulls/comments/67836241"},"html":{"href":"https://github.com/alphagov/notifications-api/pull/454#discussion_r67836241"},"pull_request":{"href":"https://api.github.com/repos/alphagov/notifications-api/pulls/454"}}},"pull_request":{"url":"https://api.github.com/repos/alphagov/notifications-api/pulls/454","id":74464112,"html_url":"https://github.com/alphagov/notifications-api/pull/454","diff_url":"https://github.com/alphagov/notifications-api/pull/454.diff","patch_url":"https://github.com/alphagov/notifications-api/pull/454.patch","issue_url":"https://api.github.com/repos/alphagov/notifications-api/issues/454","number":454,"state":"open","locked":false,"title":"Store personalisation with notification","user":{"login":"ashimali","id":666250,"avatar_url":"https://avatars.githubusercontent.com/u/666250?v=3","gravatar_id":"","url":"https://api.github.com/users/ashimali","html_url":"https://github.com/ashimali","followers_url":"https://api.github.com/users/ashimali/followers","following_url":"https://api.github.com/users/ashimali/following{/other_user}","gists_url":"https://api.github.com/users/ashimali/gists{/gist_id}","starred_url":"https://api.github.com/users/ashimali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashimali/subscriptions","organizations_url":"https://api.github.com/users/ashimali/orgs","repos_url":"https://api.github.com/users/ashimali/repos","events_url":"https://api.github.com/users/ashimali/events{/privacy}","received_events_url":"https://api.github.com/users/ashimali/received_events","type":"User","site_admin":false},"body":"This pr is for https://www.pivotaltracker.com/story/show/121672129\r\n\r\nPersonalisation is now saved with notification.\r\n\r\nTemplate and personalisation content is now merged and returned with\r\nnotifications, when retrieved by notification id, or service id (i.e.\r\nall notifications for service).\r\n\r\nThere is a new element returned at top level of notification json called\r\nbody, which is the template content merged with personalisation. This\r\nis consistent with api to endpoint to create notification which returns\r\nwhat was sent as 'body' in json response.\r\n\r\nMerging of template with personalisation is done in the\r\nNotificationStatusSchema.\r\n\r\nPersonalisation data in encrypted before storing in db.","created_at":"2016-06-20T15:36:40Z","updated_at":"2016-06-21T09:29:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aff0be4ab1e423772db4a17a8b5225356bc1dbc7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/notifications-api/pulls/454/commits","review_comments_url":"https://api.github.com/repos/alphagov/notifications-api/pulls/454/comments","review_comment_url":"https://api.github.com/repos/alphagov/notifications-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/notifications-api/issues/454/comments","statuses_url":"https://api.github.com/repos/alphagov/notifications-api/statuses/731bb19a9c566fcde4ae2862d80a861866c8727b","head":{"label":"alphagov:store-notification-personalisation","ref":"store-notification-personalisation","sha":"731bb19a9c566fcde4ae2862d80a861866c8727b","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":46422101,"name":"notifications-api","full_name":"alphagov/notifications-api","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/notifications-api","description":"Notifications api","fork":false,"url":"https://api.github.com/repos/alphagov/notifications-api","forks_url":"https://api.github.com/repos/alphagov/notifications-api/forks","keys_url":"https://api.github.com/repos/alphagov/notifications-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/notifications-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/notifications-api/teams","hooks_url":"https://api.github.com/repos/alphagov/notifications-api/hooks","issue_events_url":"https://api.github.com/repos/alphagov/notifications-api/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/notifications-api/events","assignees_url":"https://api.github.com/repos/alphagov/notifications-api/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/notifications-api/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/notifications-api/tags","blobs_url":"https://api.github.com/repos/alphagov/notifications-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/notifications-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/notifications-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/notifications-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/notifications-api/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/notifications-api/languages","stargazers_url":"https://api.github.com/repos/alphagov/notifications-api/stargazers","contributors_url":"https://api.github.com/repos/alphagov/notifications-api/contributors","subscribers_url":"https://api.github.com/repos/alphagov/notifications-api/subscribers","subscription_url":"https://api.github.com/repos/alphagov/notifications-api/subscription","commits_url":"https://api.github.com/repos/alphagov/notifications-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/notifications-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/notifications-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/notifications-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/notifications-api/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/notifications-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/notifications-api/merges","archive_url":"https://api.github.com/repos/alphagov/notifications-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/notifications-api/downloads","issues_url":"https://api.github.com/repos/alphagov/notifications-api/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/notifications-api/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/notifications-api/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/notifications-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/notifications-api/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/notifications-api/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/notifications-api/deployments","created_at":"2015-11-18T13:57:17Z","updated_at":"2016-04-03T23:36:16Z","pushed_at":"2016-06-20T15:48:46Z","git_url":"git://github.com/alphagov/notifications-api.git","ssh_url":"git@github.com:alphagov/notifications-api.git","clone_url":"https://github.com/alphagov/notifications-api.git","svn_url":"https://github.com/alphagov/notifications-api","homepage":null,"size":1503,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"561b02208da1b85ca52c38591c404497f41faf83","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":46422101,"name":"notifications-api","full_name":"alphagov/notifications-api","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/notifications-api","description":"Notifications api","fork":false,"url":"https://api.github.com/repos/alphagov/notifications-api","forks_url":"https://api.github.com/repos/alphagov/notifications-api/forks","keys_url":"https://api.github.com/repos/alphagov/notifications-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/notifications-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/notifications-api/teams","hooks_url":"https://api.github.com/repos/alphagov/notifications-api/hooks","issue_events_url":"https://api.github.com/repos/alphagov/notifications-api/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/notifications-api/events","assignees_url":"https://api.github.com/repos/alphagov/notifications-api/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/notifications-api/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/notifications-api/tags","blobs_url":"https://api.github.com/repos/alphagov/notifications-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/notifications-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/notifications-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/notifications-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/notifications-api/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/notifications-api/languages","stargazers_url":"https://api.github.com/repos/alphagov/notifications-api/stargazers","contributors_url":"https://api.github.com/repos/alphagov/notifications-api/contributors","subscribers_url":"https://api.github.com/repos/alphagov/notifications-api/subscribers","subscription_url":"https://api.github.com/repos/alphagov/notifications-api/subscription","commits_url":"https://api.github.com/repos/alphagov/notifications-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/notifications-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/notifications-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/notifications-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/notifications-api/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/notifications-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/notifications-api/merges","archive_url":"https://api.github.com/repos/alphagov/notifications-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/notifications-api/downloads","issues_url":"https://api.github.com/repos/alphagov/notifications-api/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/notifications-api/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/notifications-api/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/notifications-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/notifications-api/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/notifications-api/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/notifications-api/deployments","created_at":"2015-11-18T13:57:17Z","updated_at":"2016-04-03T23:36:16Z","pushed_at":"2016-06-20T15:48:46Z","git_url":"git://github.com/alphagov/notifications-api.git","ssh_url":"git@github.com:alphagov/notifications-api.git","clone_url":"https://github.com/alphagov/notifications-api.git","svn_url":"https://github.com/alphagov/notifications-api","homepage":null,"size":1503,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/notifications-api/pulls/454"},"html":{"href":"https://github.com/alphagov/notifications-api/pull/454"},"issue":{"href":"https://api.github.com/repos/alphagov/notifications-api/issues/454"},"comments":{"href":"https://api.github.com/repos/alphagov/notifications-api/issues/454/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/notifications-api/pulls/454/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/notifications-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/notifications-api/pulls/454/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/notifications-api/statuses/731bb19a9c566fcde4ae2862d80a861866c8727b"}}}}
{"actor":{"display_login":"ashimali"}}