{"action":"created","comment":{"url":"https://api.github.com/repos/macarthur-lab/seqr/pulls/comments/196268068","pull_request_review_id":129787638,"id":196268068,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NjI2ODA2OA==","diff_hunk":"@@ -233,6 +242,26 @@ def generate_slack_notification_for_incoming_match(response_from_matchbox,incomi\n         message += 'These matches were sent back today (' + time.strftime('%d, %b %Y')  + ').'\n         if settings.SLACK_TOKEN is not None:\n             post_in_slack(message,settings.MME_SLACK_MATCH_NOTIFICATION_CHANNEL)\n+        if settings.EMAIL_NOTIFICATIONS_ACTIVATED:\n+            email_content = render_to_string(\n+                'emails/mme_returned_match_result_message.txt',\n+                {'query_institution': institution,\n+                 'number_of_results': len(results_from_matchbox),\n+                 'incoming_query_contact_genes':','.join(incoming_query_genes),\n+                 'incoming_query_contact_phenotypes':', '.join([key + '(' + incoming_query_phenotypes[key]['name'] +')' for key in incoming_query_phenotypes]),\n+                 'incoming_query_contact_url':incoming_patient_as_json['patient']['contact'].get('href','(sorry I was not able to read the information given for URL'),\n+                 'incoming_query_contact_name':incoming_patient_as_json['patient']['contact'].get('name','(sorry I was not able to read the information given for name'),\n+                 'match_results':'\\n'.join(match_results),\n+                 'email_addresses_alert_sent_to':','.join([i for i in seqr_project.mme_contact_url.replace('mailto:','').split(',')]),\n+                 },\n+            )\n+            send_mail('match found by matchbox, the Matchmaker Exchange @Broad', \n+                      email_content, \n+                      settings.FROM_EMAIL, \n+                      #commenting for now for advanced testing\n+                      #[i for i in seqr_project.mme_contact_url.replace('mailto:','').split(',')],\n+                      ['harindra@broadinstitute.org'],","path":"xbrowse_server/matchmaker/utilities.py","position":null,"original_position":89,"commit_id":"d76fb79b2d7505254e32efa4d6886fe1042d6c79","original_commit_id":"0f2e5ea832e37438a1911b9efab6344534482fa0","user":{"login":"bw2","id":6240170,"node_id":"MDQ6VXNlcjYyNDAxNzA=","avatar_url":"https://avatars1.githubusercontent.com/u/6240170?v=4","gravatar_id":"","url":"https://api.github.com/users/bw2","html_url":"https://github.com/bw2","followers_url":"https://api.github.com/users/bw2/followers","following_url":"https://api.github.com/users/bw2/following{/other_user}","gists_url":"https://api.github.com/users/bw2/gists{/gist_id}","starred_url":"https://api.github.com/users/bw2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bw2/subscriptions","organizations_url":"https://api.github.com/users/bw2/orgs","repos_url":"https://api.github.com/users/bw2/repos","events_url":"https://api.github.com/users/bw2/events{/privacy}","received_events_url":"https://api.github.com/users/bw2/received_events","type":"User","site_admin":false},"body":"ah I see, that makes sense.","created_at":"2018-06-19T00:55:58Z","updated_at":"2018-06-19T00:55:58Z","html_url":"https://github.com/macarthur-lab/seqr/pull/420#discussion_r196268068","pull_request_url":"https://api.github.com/repos/macarthur-lab/seqr/pulls/420","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/macarthur-lab/seqr/pulls/comments/196268068"},"html":{"href":"https://github.com/macarthur-lab/seqr/pull/420#discussion_r196268068"},"pull_request":{"href":"https://api.github.com/repos/macarthur-lab/seqr/pulls/420"}},"in_reply_to_id":195618737},"pull_request":{"url":"https://api.github.com/repos/macarthur-lab/seqr/pulls/420","id":194364319,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0MzY0MzE5","html_url":"https://github.com/macarthur-lab/seqr/pull/420","diff_url":"https://github.com/macarthur-lab/seqr/pull/420.diff","patch_url":"https://github.com/macarthur-lab/seqr/pull/420.patch","issue_url":"https://api.github.com/repos/macarthur-lab/seqr/issues/420","number":420,"state":"open","locked":false,"title":"Feature match email alerts","user":{"login":"harindra-a","id":15202044,"node_id":"MDQ6VXNlcjE1MjAyMDQ0","avatar_url":"https://avatars3.githubusercontent.com/u/15202044?v=4","gravatar_id":"","url":"https://api.github.com/users/harindra-a","html_url":"https://github.com/harindra-a","followers_url":"https://api.github.com/users/harindra-a/followers","following_url":"https://api.github.com/users/harindra-a/following{/other_user}","gists_url":"https://api.github.com/users/harindra-a/gists{/gist_id}","starred_url":"https://api.github.com/users/harindra-a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harindra-a/subscriptions","organizations_url":"https://api.github.com/users/harindra-a/orgs","repos_url":"https://api.github.com/users/harindra-a/repos","events_url":"https://api.github.com/users/harindra-a/events{/privacy}","received_events_url":"https://api.github.com/users/harindra-a/received_events","type":"User","site_admin":false},"body":"sending out email alerts instead of slack alerts for incoming match requests that results in cases being sent out. This initial release will only email harindra@broad to make sure everything is OK before notifying collaborators (extra level of security is due to sensitive gene information being exchanged)","created_at":"2018-06-12T18:11:18Z","updated_at":"2018-06-19T00:55:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b1896ab6b16fdaa2af541ed00fe8455ee8db5bac","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/macarthur-lab/seqr/pulls/420/commits","review_comments_url":"https://api.github.com/repos/macarthur-lab/seqr/pulls/420/comments","review_comment_url":"https://api.github.com/repos/macarthur-lab/seqr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/macarthur-lab/seqr/issues/420/comments","statuses_url":"https://api.github.com/repos/macarthur-lab/seqr/statuses/d76fb79b2d7505254e32efa4d6886fe1042d6c79","head":{"label":"macarthur-lab:feature-match_email_alerts","ref":"feature-match_email_alerts","sha":"d76fb79b2d7505254e32efa4d6886fe1042d6c79","user":{"login":"macarthur-lab","id":6932789,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5MzI3ODk=","avatar_url":"https://avatars0.githubusercontent.com/u/6932789?v=4","gravatar_id":"","url":"https://api.github.com/users/macarthur-lab","html_url":"https://github.com/macarthur-lab","followers_url":"https://api.github.com/users/macarthur-lab/followers","following_url":"https://api.github.com/users/macarthur-lab/following{/other_user}","gists_url":"https://api.github.com/users/macarthur-lab/gists{/gist_id}","starred_url":"https://api.github.com/users/macarthur-lab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macarthur-lab/subscriptions","organizations_url":"https://api.github.com/users/macarthur-lab/orgs","repos_url":"https://api.github.com/users/macarthur-lab/repos","events_url":"https://api.github.com/users/macarthur-lab/events{/privacy}","received_events_url":"https://api.github.com/users/macarthur-lab/received_events","type":"Organization","site_admin":false},"repo":{"id":15710196,"node_id":"MDEwOlJlcG9zaXRvcnkxNTcxMDE5Ng==","name":"seqr","full_name":"macarthur-lab/seqr","owner":{"login":"macarthur-lab","id":6932789,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5MzI3ODk=","avatar_url":"https://avatars0.githubusercontent.com/u/6932789?v=4","gravatar_id":"","url":"https://api.github.com/users/macarthur-lab","html_url":"https://github.com/macarthur-lab","followers_url":"https://api.github.com/users/macarthur-lab/followers","following_url":"https://api.github.com/users/macarthur-lab/following{/other_user}","gists_url":"https://api.github.com/users/macarthur-lab/gists{/gist_id}","starred_url":"https://api.github.com/users/macarthur-lab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macarthur-lab/subscriptions","organizations_url":"https://api.github.com/users/macarthur-lab/orgs","repos_url":"https://api.github.com/users/macarthur-lab/repos","events_url":"https://api.github.com/users/macarthur-lab/events{/privacy}","received_events_url":"https://api.github.com/users/macarthur-lab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/macarthur-lab/seqr","description":" web-based analysis tool for rare disease genomics","fork":false,"url":"https://api.github.com/repos/macarthur-lab/seqr","forks_url":"https://api.github.com/repos/macarthur-lab/seqr/forks","keys_url":"https://api.github.com/repos/macarthur-lab/seqr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/macarthur-lab/seqr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/macarthur-lab/seqr/teams","hooks_url":"https://api.github.com/repos/macarthur-lab/seqr/hooks","issue_events_url":"https://api.github.com/repos/macarthur-lab/seqr/issues/events{/number}","events_url":"https://api.github.com/repos/macarthur-lab/seqr/events","assignees_url":"https://api.github.com/repos/macarthur-lab/seqr/assignees{/user}","branches_url":"https://api.github.com/repos/macarthur-lab/seqr/branches{/branch}","tags_url":"https://api.github.com/repos/macarthur-lab/seqr/tags","blobs_url":"https://api.github.com/repos/macarthur-lab/seqr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/macarthur-lab/seqr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/macarthur-lab/seqr/git/refs{/sha}","trees_url":"https://api.github.com/repos/macarthur-lab/seqr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/macarthur-lab/seqr/statuses/{sha}","languages_url":"https://api.github.com/repos/macarthur-lab/seqr/languages","stargazers_url":"https://api.github.com/repos/macarthur-lab/seqr/stargazers","contributors_url":"https://api.github.com/repos/macarthur-lab/seqr/contributors","subscribers_url":"https://api.github.com/repos/macarthur-lab/seqr/subscribers","subscription_url":"https://api.github.com/repos/macarthur-lab/seqr/subscription","commits_url":"https://api.github.com/repos/macarthur-lab/seqr/commits{/sha}","git_commits_url":"https://api.github.com/repos/macarthur-lab/seqr/git/commits{/sha}","comments_url":"https://api.github.com/repos/macarthur-lab/seqr/comments{/number}","issue_comment_url":"https://api.github.com/repos/macarthur-lab/seqr/issues/comments{/number}","contents_url":"https://api.github.com/repos/macarthur-lab/seqr/contents/{+path}","compare_url":"https://api.github.com/repos/macarthur-lab/seqr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/macarthur-lab/seqr/merges","archive_url":"https://api.github.com/repos/macarthur-lab/seqr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/macarthur-lab/seqr/downloads","issues_url":"https://api.github.com/repos/macarthur-lab/seqr/issues{/number}","pulls_url":"https://api.github.com/repos/macarthur-lab/seqr/pulls{/number}","milestones_url":"https://api.github.com/repos/macarthur-lab/seqr/milestones{/number}","notifications_url":"https://api.github.com/repos/macarthur-lab/seqr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/macarthur-lab/seqr/labels{/name}","releases_url":"https://api.github.com/repos/macarthur-lab/seqr/releases{/id}","deployments_url":"https://api.github.com/repos/macarthur-lab/seqr/deployments","created_at":"2014-01-07T16:43:37Z","updated_at":"2018-06-18T11:05:16Z","pushed_at":"2018-06-18T16:46:28Z","git_url":"git://github.com/macarthur-lab/seqr.git","ssh_url":"git@github.com:macarthur-lab/seqr.git","clone_url":"https://github.com/macarthur-lab/seqr.git","svn_url":"https://github.com/macarthur-lab/seqr","homepage":"","size":104513,"stargazers_count":57,"watchers_count":57,"language":"PLSQL","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"archived":false,"open_issues_count":115,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":25,"open_issues":115,"watchers":57,"default_branch":"master"}},"base":{"label":"macarthur-lab:dev","ref":"dev","sha":"83c31f9e49523c72b0885196b6f193c277c33a26","user":{"login":"macarthur-lab","id":6932789,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5MzI3ODk=","avatar_url":"https://avatars0.githubusercontent.com/u/6932789?v=4","gravatar_id":"","url":"https://api.github.com/users/macarthur-lab","html_url":"https://github.com/macarthur-lab","followers_url":"https://api.github.com/users/macarthur-lab/followers","following_url":"https://api.github.com/users/macarthur-lab/following{/other_user}","gists_url":"https://api.github.com/users/macarthur-lab/gists{/gist_id}","starred_url":"https://api.github.com/users/macarthur-lab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macarthur-lab/subscriptions","organizations_url":"https://api.github.com/users/macarthur-lab/orgs","repos_url":"https://api.github.com/users/macarthur-lab/repos","events_url":"https://api.github.com/users/macarthur-lab/events{/privacy}","received_events_url":"https://api.github.com/users/macarthur-lab/received_events","type":"Organization","site_admin":false},"repo":{"id":15710196,"node_id":"MDEwOlJlcG9zaXRvcnkxNTcxMDE5Ng==","name":"seqr","full_name":"macarthur-lab/seqr","owner":{"login":"macarthur-lab","id":6932789,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5MzI3ODk=","avatar_url":"https://avatars0.githubusercontent.com/u/6932789?v=4","gravatar_id":"","url":"https://api.github.com/users/macarthur-lab","html_url":"https://github.com/macarthur-lab","followers_url":"https://api.github.com/users/macarthur-lab/followers","following_url":"https://api.github.com/users/macarthur-lab/following{/other_user}","gists_url":"https://api.github.com/users/macarthur-lab/gists{/gist_id}","starred_url":"https://api.github.com/users/macarthur-lab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macarthur-lab/subscriptions","organizations_url":"https://api.github.com/users/macarthur-lab/orgs","repos_url":"https://api.github.com/users/macarthur-lab/repos","events_url":"https://api.github.com/users/macarthur-lab/events{/privacy}","received_events_url":"https://api.github.com/users/macarthur-lab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/macarthur-lab/seqr","description":" web-based analysis tool for rare disease genomics","fork":false,"url":"https://api.github.com/repos/macarthur-lab/seqr","forks_url":"https://api.github.com/repos/macarthur-lab/seqr/forks","keys_url":"https://api.github.com/repos/macarthur-lab/seqr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/macarthur-lab/seqr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/macarthur-lab/seqr/teams","hooks_url":"https://api.github.com/repos/macarthur-lab/seqr/hooks","issue_events_url":"https://api.github.com/repos/macarthur-lab/seqr/issues/events{/number}","events_url":"https://api.github.com/repos/macarthur-lab/seqr/events","assignees_url":"https://api.github.com/repos/macarthur-lab/seqr/assignees{/user}","branches_url":"https://api.github.com/repos/macarthur-lab/seqr/branches{/branch}","tags_url":"https://api.github.com/repos/macarthur-lab/seqr/tags","blobs_url":"https://api.github.com/repos/macarthur-lab/seqr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/macarthur-lab/seqr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/macarthur-lab/seqr/git/refs{/sha}","trees_url":"https://api.github.com/repos/macarthur-lab/seqr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/macarthur-lab/seqr/statuses/{sha}","languages_url":"https://api.github.com/repos/macarthur-lab/seqr/languages","stargazers_url":"https://api.github.com/repos/macarthur-lab/seqr/stargazers","contributors_url":"https://api.github.com/repos/macarthur-lab/seqr/contributors","subscribers_url":"https://api.github.com/repos/macarthur-lab/seqr/subscribers","subscription_url":"https://api.github.com/repos/macarthur-lab/seqr/subscription","commits_url":"https://api.github.com/repos/macarthur-lab/seqr/commits{/sha}","git_commits_url":"https://api.github.com/repos/macarthur-lab/seqr/git/commits{/sha}","comments_url":"https://api.github.com/repos/macarthur-lab/seqr/comments{/number}","issue_comment_url":"https://api.github.com/repos/macarthur-lab/seqr/issues/comments{/number}","contents_url":"https://api.github.com/repos/macarthur-lab/seqr/contents/{+path}","compare_url":"https://api.github.com/repos/macarthur-lab/seqr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/macarthur-lab/seqr/merges","archive_url":"https://api.github.com/repos/macarthur-lab/seqr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/macarthur-lab/seqr/downloads","issues_url":"https://api.github.com/repos/macarthur-lab/seqr/issues{/number}","pulls_url":"https://api.github.com/repos/macarthur-lab/seqr/pulls{/number}","milestones_url":"https://api.github.com/repos/macarthur-lab/seqr/milestones{/number}","notifications_url":"https://api.github.com/repos/macarthur-lab/seqr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/macarthur-lab/seqr/labels{/name}","releases_url":"https://api.github.com/repos/macarthur-lab/seqr/releases{/id}","deployments_url":"https://api.github.com/repos/macarthur-lab/seqr/deployments","created_at":"2014-01-07T16:43:37Z","updated_at":"2018-06-18T11:05:16Z","pushed_at":"2018-06-18T16:46:28Z","git_url":"git://github.com/macarthur-lab/seqr.git","ssh_url":"git@github.com:macarthur-lab/seqr.git","clone_url":"https://github.com/macarthur-lab/seqr.git","svn_url":"https://github.com/macarthur-lab/seqr","homepage":"","size":104513,"stargazers_count":57,"watchers_count":57,"language":"PLSQL","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"archived":false,"open_issues_count":115,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":25,"open_issues":115,"watchers":57,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/macarthur-lab/seqr/pulls/420"},"html":{"href":"https://github.com/macarthur-lab/seqr/pull/420"},"issue":{"href":"https://api.github.com/repos/macarthur-lab/seqr/issues/420"},"comments":{"href":"https://api.github.com/repos/macarthur-lab/seqr/issues/420/comments"},"review_comments":{"href":"https://api.github.com/repos/macarthur-lab/seqr/pulls/420/comments"},"review_comment":{"href":"https://api.github.com/repos/macarthur-lab/seqr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/macarthur-lab/seqr/pulls/420/commits"},"statuses":{"href":"https://api.github.com/repos/macarthur-lab/seqr/statuses/d76fb79b2d7505254e32efa4d6886fe1042d6c79"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"bw2"}}