{"action":"created","comment":{"url":"https://api.github.com/repos/GrafeasGroup/tor_core/pulls/comments/167797701","pull_request_review_id":96064929,"id":167797701,"diff_hunk":"@@ -262,6 +265,28 @@ def get_heartbeat_port(config):\n             return port\n \n \n+def configure_modchat(config):\n+    if config.modchat_api_url:\n+        # creating the connection is much slower than for slack -- it takes about\n+        # a second. Instead of doing that every time we need to send a message,\n+        # we'll do it once here and just pass the RocketChat instance around.\n+        try:\n+            config.modchat = RocketChat(\n+                os.environ.get('MODCHAT_API_USERNAME', None),\n+                os.environ.get('MODCHAT_API_PASSWORD', None),","path":"tor_core/initialize.py","position":22,"original_position":22,"commit_id":"c8210afcb56b96708d781275b41f0baa898843da","original_commit_id":"c8210afcb56b96708d781275b41f0baa898843da","user":{"login":"arfie","id":6819778,"avatar_url":"https://avatars3.githubusercontent.com/u/6819778?v=4","gravatar_id":"","url":"https://api.github.com/users/arfie","html_url":"https://github.com/arfie","followers_url":"https://api.github.com/users/arfie/followers","following_url":"https://api.github.com/users/arfie/following{/other_user}","gists_url":"https://api.github.com/users/arfie/gists{/gist_id}","starred_url":"https://api.github.com/users/arfie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arfie/subscriptions","organizations_url":"https://api.github.com/users/arfie/orgs","repos_url":"https://api.github.com/users/arfie/repos","events_url":"https://api.github.com/users/arfie/events{/privacy}","received_events_url":"https://api.github.com/users/arfie/received_events","type":"User","site_admin":false},"body":"Do we want `None` as a default? It'll fail anyway if the credentials are absent so I'd say `os.environ[...]` would be better. Doesn't really matter though.","created_at":"2018-02-13T09:07:14Z","updated_at":"2018-02-13T09:07:28Z","html_url":"https://github.com/GrafeasGroup/tor_core/pull/16#discussion_r167797701","pull_request_url":"https://api.github.com/repos/GrafeasGroup/tor_core/pulls/16","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/GrafeasGroup/tor_core/pulls/comments/167797701"},"html":{"href":"https://github.com/GrafeasGroup/tor_core/pull/16#discussion_r167797701"},"pull_request":{"href":"https://api.github.com/repos/GrafeasGroup/tor_core/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/GrafeasGroup/tor_core/pulls/16","id":168753920,"html_url":"https://github.com/GrafeasGroup/tor_core/pull/16","diff_url":"https://github.com/GrafeasGroup/tor_core/pull/16.diff","patch_url":"https://github.com/GrafeasGroup/tor_core/pull/16.patch","issue_url":"https://api.github.com/repos/GrafeasGroup/tor_core/issues/16","number":16,"state":"open","locked":false,"title":"Modchat update","user":{"login":"itsthejoker","id":5179553,"avatar_url":"https://avatars1.githubusercontent.com/u/5179553?v=4","gravatar_id":"","url":"https://api.github.com/users/itsthejoker","html_url":"https://github.com/itsthejoker","followers_url":"https://api.github.com/users/itsthejoker/followers","following_url":"https://api.github.com/users/itsthejoker/following{/other_user}","gists_url":"https://api.github.com/users/itsthejoker/gists{/gist_id}","starred_url":"https://api.github.com/users/itsthejoker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itsthejoker/subscriptions","organizations_url":"https://api.github.com/users/itsthejoker/orgs","repos_url":"https://api.github.com/users/itsthejoker/repos","events_url":"https://api.github.com/users/itsthejoker/events{/privacy}","received_events_url":"https://api.github.com/users/itsthejoker/received_events","type":"User","site_admin":false},"body":"This removes the slack integration and replaces it with the rocket.chat integration. This _must_ be merged with the corresponding PR in tor.","created_at":"2018-02-13T04:54:05Z","updated_at":"2018-02-13T09:07:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"44b572071a414b168198c58389e37ff9f99a3baf","assignee":{"login":"itsthejoker","id":5179553,"avatar_url":"https://avatars1.githubusercontent.com/u/5179553?v=4","gravatar_id":"","url":"https://api.github.com/users/itsthejoker","html_url":"https://github.com/itsthejoker","followers_url":"https://api.github.com/users/itsthejoker/followers","following_url":"https://api.github.com/users/itsthejoker/following{/other_user}","gists_url":"https://api.github.com/users/itsthejoker/gists{/gist_id}","starred_url":"https://api.github.com/users/itsthejoker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itsthejoker/subscriptions","organizations_url":"https://api.github.com/users/itsthejoker/orgs","repos_url":"https://api.github.com/users/itsthejoker/repos","events_url":"https://api.github.com/users/itsthejoker/events{/privacy}","received_events_url":"https://api.github.com/users/itsthejoker/received_events","type":"User","site_admin":false},"assignees":[{"login":"itsthejoker","id":5179553,"avatar_url":"https://avatars1.githubusercontent.com/u/5179553?v=4","gravatar_id":"","url":"https://api.github.com/users/itsthejoker","html_url":"https://github.com/itsthejoker","followers_url":"https://api.github.com/users/itsthejoker/followers","following_url":"https://api.github.com/users/itsthejoker/following{/other_user}","gists_url":"https://api.github.com/users/itsthejoker/gists{/gist_id}","starred_url":"https://api.github.com/users/itsthejoker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itsthejoker/subscriptions","organizations_url":"https://api.github.com/users/itsthejoker/orgs","repos_url":"https://api.github.com/users/itsthejoker/repos","events_url":"https://api.github.com/users/itsthejoker/events{/privacy}","received_events_url":"https://api.github.com/users/itsthejoker/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"TheLonelyGhost","id":1276113,"avatar_url":"https://avatars1.githubusercontent.com/u/1276113?v=4","gravatar_id":"","url":"https://api.github.com/users/TheLonelyGhost","html_url":"https://github.com/TheLonelyGhost","followers_url":"https://api.github.com/users/TheLonelyGhost/followers","following_url":"https://api.github.com/users/TheLonelyGhost/following{/other_user}","gists_url":"https://api.github.com/users/TheLonelyGhost/gists{/gist_id}","starred_url":"https://api.github.com/users/TheLonelyGhost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheLonelyGhost/subscriptions","organizations_url":"https://api.github.com/users/TheLonelyGhost/orgs","repos_url":"https://api.github.com/users/TheLonelyGhost/repos","events_url":"https://api.github.com/users/TheLonelyGhost/events{/privacy}","received_events_url":"https://api.github.com/users/TheLonelyGhost/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":726189311,"url":"https://api.github.com/repos/GrafeasGroup/tor_core/labels/in%20progress","name":"in progress","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/GrafeasGroup/tor_core/pulls/16/commits","review_comments_url":"https://api.github.com/repos/GrafeasGroup/tor_core/pulls/16/comments","review_comment_url":"https://api.github.com/repos/GrafeasGroup/tor_core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GrafeasGroup/tor_core/issues/16/comments","statuses_url":"https://api.github.com/repos/GrafeasGroup/tor_core/statuses/c8210afcb56b96708d781275b41f0baa898843da","head":{"label":"GrafeasGroup:modchat_update","ref":"modchat_update","sha":"c8210afcb56b96708d781275b41f0baa898843da","user":{"login":"GrafeasGroup","id":29612922,"avatar_url":"https://avatars3.githubusercontent.com/u/29612922?v=4","gravatar_id":"","url":"https://api.github.com/users/GrafeasGroup","html_url":"https://github.com/GrafeasGroup","followers_url":"https://api.github.com/users/GrafeasGroup/followers","following_url":"https://api.github.com/users/GrafeasGroup/following{/other_user}","gists_url":"https://api.github.com/users/GrafeasGroup/gists{/gist_id}","starred_url":"https://api.github.com/users/GrafeasGroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrafeasGroup/subscriptions","organizations_url":"https://api.github.com/users/GrafeasGroup/orgs","repos_url":"https://api.github.com/users/GrafeasGroup/repos","events_url":"https://api.github.com/users/GrafeasGroup/events{/privacy}","received_events_url":"https://api.github.com/users/GrafeasGroup/received_events","type":"Organization","site_admin":false},"repo":{"id":96048468,"name":"tor_core","full_name":"GrafeasGroup/tor_core","owner":{"login":"GrafeasGroup","id":29612922,"avatar_url":"https://avatars3.githubusercontent.com/u/29612922?v=4","gravatar_id":"","url":"https://api.github.com/users/GrafeasGroup","html_url":"https://github.com/GrafeasGroup","followers_url":"https://api.github.com/users/GrafeasGroup/followers","following_url":"https://api.github.com/users/GrafeasGroup/following{/other_user}","gists_url":"https://api.github.com/users/GrafeasGroup/gists{/gist_id}","starred_url":"https://api.github.com/users/GrafeasGroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrafeasGroup/subscriptions","organizations_url":"https://api.github.com/users/GrafeasGroup/orgs","repos_url":"https://api.github.com/users/GrafeasGroup/repos","events_url":"https://api.github.com/users/GrafeasGroup/events{/privacy}","received_events_url":"https://api.github.com/users/GrafeasGroup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GrafeasGroup/tor_core","description":"Everything a growing bot needs!","fork":false,"url":"https://api.github.com/repos/GrafeasGroup/tor_core","forks_url":"https://api.github.com/repos/GrafeasGroup/tor_core/forks","keys_url":"https://api.github.com/repos/GrafeasGroup/tor_core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GrafeasGroup/tor_core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GrafeasGroup/tor_core/teams","hooks_url":"https://api.github.com/repos/GrafeasGroup/tor_core/hooks","issue_events_url":"https://api.github.com/repos/GrafeasGroup/tor_core/issues/events{/number}","events_url":"https://api.github.com/repos/GrafeasGroup/tor_core/events","assignees_url":"https://api.github.com/repos/GrafeasGroup/tor_core/assignees{/user}","branches_url":"https://api.github.com/repos/GrafeasGroup/tor_core/branches{/branch}","tags_url":"https://api.github.com/repos/GrafeasGroup/tor_core/tags","blobs_url":"https://api.github.com/repos/GrafeasGroup/tor_core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GrafeasGroup/tor_core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GrafeasGroup/tor_core/git/refs{/sha}","trees_url":"https://api.github.com/repos/GrafeasGroup/tor_core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GrafeasGroup/tor_core/statuses/{sha}","languages_url":"https://api.github.com/repos/GrafeasGroup/tor_core/languages","stargazers_url":"https://api.github.com/repos/GrafeasGroup/tor_core/stargazers","contributors_url":"https://api.github.com/repos/GrafeasGroup/tor_core/contributors","subscribers_url":"https://api.github.com/repos/GrafeasGroup/tor_core/subscribers","subscription_url":"https://api.github.com/repos/GrafeasGroup/tor_core/subscription","commits_url":"https://api.github.com/repos/GrafeasGroup/tor_core/commits{/sha}","git_commits_url":"https://api.github.com/repos/GrafeasGroup/tor_core/git/commits{/sha}","comments_url":"https://api.github.com/repos/GrafeasGroup/tor_core/comments{/number}","issue_comment_url":"https://api.github.com/repos/GrafeasGroup/tor_core/issues/comments{/number}","contents_url":"https://api.github.com/repos/GrafeasGroup/tor_core/contents/{+path}","compare_url":"https://api.github.com/repos/GrafeasGroup/tor_core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GrafeasGroup/tor_core/merges","archive_url":"https://api.github.com/repos/GrafeasGroup/tor_core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GrafeasGroup/tor_core/downloads","issues_url":"https://api.github.com/repos/GrafeasGroup/tor_core/issues{/number}","pulls_url":"https://api.github.com/repos/GrafeasGroup/tor_core/pulls{/number}","milestones_url":"https://api.github.com/repos/GrafeasGroup/tor_core/milestones{/number}","notifications_url":"https://api.github.com/repos/GrafeasGroup/tor_core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GrafeasGroup/tor_core/labels{/name}","releases_url":"https://api.github.com/repos/GrafeasGroup/tor_core/releases{/id}","deployments_url":"https://api.github.com/repos/GrafeasGroup/tor_core/deployments","created_at":"2017-07-02T20:55:20Z","updated_at":"2017-11-21T03:36:10Z","pushed_at":"2018-02-13T04:54:06Z","git_url":"git://github.com/GrafeasGroup/tor_core.git","ssh_url":"git@github.com:GrafeasGroup/tor_core.git","clone_url":"https://github.com/GrafeasGroup/tor_core.git","svn_url":"https://github.com/GrafeasGroup/tor_core","homepage":null,"size":69,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":2,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"GrafeasGroup:master","ref":"master","sha":"102f76aac2bce55a79e7799ff3d04dea526d6f42","user":{"login":"GrafeasGroup","id":29612922,"avatar_url":"https://avatars3.githubusercontent.com/u/29612922?v=4","gravatar_id":"","url":"https://api.github.com/users/GrafeasGroup","html_url":"https://github.com/GrafeasGroup","followers_url":"https://api.github.com/users/GrafeasGroup/followers","following_url":"https://api.github.com/users/GrafeasGroup/following{/other_user}","gists_url":"https://api.github.com/users/GrafeasGroup/gists{/gist_id}","starred_url":"https://api.github.com/users/GrafeasGroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrafeasGroup/subscriptions","organizations_url":"https://api.github.com/users/GrafeasGroup/orgs","repos_url":"https://api.github.com/users/GrafeasGroup/repos","events_url":"https://api.github.com/users/GrafeasGroup/events{/privacy}","received_events_url":"https://api.github.com/users/GrafeasGroup/received_events","type":"Organization","site_admin":false},"repo":{"id":96048468,"name":"tor_core","full_name":"GrafeasGroup/tor_core","owner":{"login":"GrafeasGroup","id":29612922,"avatar_url":"https://avatars3.githubusercontent.com/u/29612922?v=4","gravatar_id":"","url":"https://api.github.com/users/GrafeasGroup","html_url":"https://github.com/GrafeasGroup","followers_url":"https://api.github.com/users/GrafeasGroup/followers","following_url":"https://api.github.com/users/GrafeasGroup/following{/other_user}","gists_url":"https://api.github.com/users/GrafeasGroup/gists{/gist_id}","starred_url":"https://api.github.com/users/GrafeasGroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrafeasGroup/subscriptions","organizations_url":"https://api.github.com/users/GrafeasGroup/orgs","repos_url":"https://api.github.com/users/GrafeasGroup/repos","events_url":"https://api.github.com/users/GrafeasGroup/events{/privacy}","received_events_url":"https://api.github.com/users/GrafeasGroup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GrafeasGroup/tor_core","description":"Everything a growing bot needs!","fork":false,"url":"https://api.github.com/repos/GrafeasGroup/tor_core","forks_url":"https://api.github.com/repos/GrafeasGroup/tor_core/forks","keys_url":"https://api.github.com/repos/GrafeasGroup/tor_core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GrafeasGroup/tor_core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GrafeasGroup/tor_core/teams","hooks_url":"https://api.github.com/repos/GrafeasGroup/tor_core/hooks","issue_events_url":"https://api.github.com/repos/GrafeasGroup/tor_core/issues/events{/number}","events_url":"https://api.github.com/repos/GrafeasGroup/tor_core/events","assignees_url":"https://api.github.com/repos/GrafeasGroup/tor_core/assignees{/user}","branches_url":"https://api.github.com/repos/GrafeasGroup/tor_core/branches{/branch}","tags_url":"https://api.github.com/repos/GrafeasGroup/tor_core/tags","blobs_url":"https://api.github.com/repos/GrafeasGroup/tor_core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GrafeasGroup/tor_core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GrafeasGroup/tor_core/git/refs{/sha}","trees_url":"https://api.github.com/repos/GrafeasGroup/tor_core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GrafeasGroup/tor_core/statuses/{sha}","languages_url":"https://api.github.com/repos/GrafeasGroup/tor_core/languages","stargazers_url":"https://api.github.com/repos/GrafeasGroup/tor_core/stargazers","contributors_url":"https://api.github.com/repos/GrafeasGroup/tor_core/contributors","subscribers_url":"https://api.github.com/repos/GrafeasGroup/tor_core/subscribers","subscription_url":"https://api.github.com/repos/GrafeasGroup/tor_core/subscription","commits_url":"https://api.github.com/repos/GrafeasGroup/tor_core/commits{/sha}","git_commits_url":"https://api.github.com/repos/GrafeasGroup/tor_core/git/commits{/sha}","comments_url":"https://api.github.com/repos/GrafeasGroup/tor_core/comments{/number}","issue_comment_url":"https://api.github.com/repos/GrafeasGroup/tor_core/issues/comments{/number}","contents_url":"https://api.github.com/repos/GrafeasGroup/tor_core/contents/{+path}","compare_url":"https://api.github.com/repos/GrafeasGroup/tor_core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GrafeasGroup/tor_core/merges","archive_url":"https://api.github.com/repos/GrafeasGroup/tor_core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GrafeasGroup/tor_core/downloads","issues_url":"https://api.github.com/repos/GrafeasGroup/tor_core/issues{/number}","pulls_url":"https://api.github.com/repos/GrafeasGroup/tor_core/pulls{/number}","milestones_url":"https://api.github.com/repos/GrafeasGroup/tor_core/milestones{/number}","notifications_url":"https://api.github.com/repos/GrafeasGroup/tor_core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GrafeasGroup/tor_core/labels{/name}","releases_url":"https://api.github.com/repos/GrafeasGroup/tor_core/releases{/id}","deployments_url":"https://api.github.com/repos/GrafeasGroup/tor_core/deployments","created_at":"2017-07-02T20:55:20Z","updated_at":"2017-11-21T03:36:10Z","pushed_at":"2018-02-13T04:54:06Z","git_url":"git://github.com/GrafeasGroup/tor_core.git","ssh_url":"git@github.com:GrafeasGroup/tor_core.git","clone_url":"https://github.com/GrafeasGroup/tor_core.git","svn_url":"https://github.com/GrafeasGroup/tor_core","homepage":null,"size":69,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":2,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GrafeasGroup/tor_core/pulls/16"},"html":{"href":"https://github.com/GrafeasGroup/tor_core/pull/16"},"issue":{"href":"https://api.github.com/repos/GrafeasGroup/tor_core/issues/16"},"comments":{"href":"https://api.github.com/repos/GrafeasGroup/tor_core/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/GrafeasGroup/tor_core/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/GrafeasGroup/tor_core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GrafeasGroup/tor_core/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/GrafeasGroup/tor_core/statuses/c8210afcb56b96708d781275b41f0baa898843da"}},"author_association":"OWNER"}}
{"actor":{"display_login":"arfie"}}