{"action":"created","comment":{"url":"https://api.github.com/repos/4teamwork/ftw.slacker/pulls/comments/129554437","pull_request_review_id":52327928,"id":129554437,"diff_hunk":"@@ -0,0 +1,87 @@\n+from ftw.slacker.interfaces import ISlackNotifier\n+from threading import Thread\n+from zope.component import getUtility\n+from zope.interface import implements\n+import os\n+import requests\n+\n+\n+def notify_slack(*args, **kwargs):\n+    \"\"\"This is the main api mehtod to perform a slack notification\n+\n+    Always use this method to do slack notifications.\n+\n+    See the readme.rst to find out how to use it.\n+    \"\"\"\n+    slacker = getUtility(ISlackNotifier)\n+    return slacker.notify(*args, **kwargs)\n+\n+\n+class SlackNotifier(object):\n+    \"\"\"The default slack notifier utility posts a message into slack through\n+    a webhook.\n+    \"\"\"\n+    implements(ISlackNotifier)\n+\n+    # Name of the request thread\n+    THREAD_NAME = 'SlackNotifier-Thread'\n+\n+    # Use this string in your environment variables to deactivate\n+    # notification.\n+    NOTIFICATION_DEACTIVATION_VALUE = 'deactivate'","path":"ftw/slacker/slack_notifier.py","position":31,"original_position":31,"commit_id":"14ba1190f61621c63fe0c6f4760e9d699954acee","original_commit_id":"14ba1190f61621c63fe0c6f4760e9d699954acee","user":{"login":"jone","id":7469,"avatar_url":"https://avatars3.githubusercontent.com/u/7469?v=4","gravatar_id":"","url":"https://api.github.com/users/jone","html_url":"https://github.com/jone","followers_url":"https://api.github.com/users/jone/followers","following_url":"https://api.github.com/users/jone/following{/other_user}","gists_url":"https://api.github.com/users/jone/gists{/gist_id}","starred_url":"https://api.github.com/users/jone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jone/subscriptions","organizations_url":"https://api.github.com/users/jone/orgs","repos_url":"https://api.github.com/users/jone/repos","events_url":"https://api.github.com/users/jone/events{/privacy}","received_events_url":"https://api.github.com/users/jone/received_events","type":"User","site_admin":false},"body":"I'd probably move this to module-level.\r\nThat also has the advantage that it can be imported from outside.","created_at":"2017-07-26T12:14:58Z","updated_at":"2017-07-26T12:28:17Z","html_url":"https://github.com/4teamwork/ftw.slacker/pull/1#discussion_r129554437","pull_request_url":"https://api.github.com/repos/4teamwork/ftw.slacker/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/4teamwork/ftw.slacker/pulls/comments/129554437"},"html":{"href":"https://github.com/4teamwork/ftw.slacker/pull/1#discussion_r129554437"},"pull_request":{"href":"https://api.github.com/repos/4teamwork/ftw.slacker/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/4teamwork/ftw.slacker/pulls/1","id":132481599,"html_url":"https://github.com/4teamwork/ftw.slacker/pull/1","diff_url":"https://github.com/4teamwork/ftw.slacker/pull/1.diff","patch_url":"https://github.com/4teamwork/ftw.slacker/pull/1.patch","issue_url":"https://api.github.com/repos/4teamwork/ftw.slacker/issues/1","number":1,"state":"open","locked":false,"title":"Implement slack notifier","user":{"login":"elioschmutz","id":557005,"avatar_url":"https://avatars1.githubusercontent.com/u/557005?v=4","gravatar_id":"","url":"https://api.github.com/users/elioschmutz","html_url":"https://github.com/elioschmutz","followers_url":"https://api.github.com/users/elioschmutz/followers","following_url":"https://api.github.com/users/elioschmutz/following{/other_user}","gists_url":"https://api.github.com/users/elioschmutz/gists{/gist_id}","starred_url":"https://api.github.com/users/elioschmutz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elioschmutz/subscriptions","organizations_url":"https://api.github.com/users/elioschmutz/orgs","repos_url":"https://api.github.com/users/elioschmutz/repos","events_url":"https://api.github.com/users/elioschmutz/events{/privacy}","received_events_url":"https://api.github.com/users/elioschmutz/received_events","type":"User","site_admin":false},"body":"Main implementation of the `ftw.slacker`.","created_at":"2017-07-26T10:30:10Z","updated_at":"2017-07-26T12:28:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7e3f115a4a422b1fcc0646c1cc6f38b2ca6a28b5","assignee":{"login":"elioschmutz","id":557005,"avatar_url":"https://avatars1.githubusercontent.com/u/557005?v=4","gravatar_id":"","url":"https://api.github.com/users/elioschmutz","html_url":"https://github.com/elioschmutz","followers_url":"https://api.github.com/users/elioschmutz/followers","following_url":"https://api.github.com/users/elioschmutz/following{/other_user}","gists_url":"https://api.github.com/users/elioschmutz/gists{/gist_id}","starred_url":"https://api.github.com/users/elioschmutz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elioschmutz/subscriptions","organizations_url":"https://api.github.com/users/elioschmutz/orgs","repos_url":"https://api.github.com/users/elioschmutz/repos","events_url":"https://api.github.com/users/elioschmutz/events{/privacy}","received_events_url":"https://api.github.com/users/elioschmutz/received_events","type":"User","site_admin":false},"assignees":[{"login":"elioschmutz","id":557005,"avatar_url":"https://avatars1.githubusercontent.com/u/557005?v=4","gravatar_id":"","url":"https://api.github.com/users/elioschmutz","html_url":"https://github.com/elioschmutz","followers_url":"https://api.github.com/users/elioschmutz/followers","following_url":"https://api.github.com/users/elioschmutz/following{/other_user}","gists_url":"https://api.github.com/users/elioschmutz/gists{/gist_id}","starred_url":"https://api.github.com/users/elioschmutz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elioschmutz/subscriptions","organizations_url":"https://api.github.com/users/elioschmutz/orgs","repos_url":"https://api.github.com/users/elioschmutz/repos","events_url":"https://api.github.com/users/elioschmutz/events{/privacy}","received_events_url":"https://api.github.com/users/elioschmutz/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/4teamwork/ftw.slacker/pulls/1/commits","review_comments_url":"https://api.github.com/repos/4teamwork/ftw.slacker/pulls/1/comments","review_comment_url":"https://api.github.com/repos/4teamwork/ftw.slacker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/4teamwork/ftw.slacker/issues/1/comments","statuses_url":"https://api.github.com/repos/4teamwork/ftw.slacker/statuses/14ba1190f61621c63fe0c6f4760e9d699954acee","head":{"label":"4teamwork:es-main-implementation","ref":"es-main-implementation","sha":"14ba1190f61621c63fe0c6f4760e9d699954acee","user":{"login":"4teamwork","id":681821,"avatar_url":"https://avatars2.githubusercontent.com/u/681821?v=4","gravatar_id":"","url":"https://api.github.com/users/4teamwork","html_url":"https://github.com/4teamwork","followers_url":"https://api.github.com/users/4teamwork/followers","following_url":"https://api.github.com/users/4teamwork/following{/other_user}","gists_url":"https://api.github.com/users/4teamwork/gists{/gist_id}","starred_url":"https://api.github.com/users/4teamwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4teamwork/subscriptions","organizations_url":"https://api.github.com/users/4teamwork/orgs","repos_url":"https://api.github.com/users/4teamwork/repos","events_url":"https://api.github.com/users/4teamwork/events{/privacy}","received_events_url":"https://api.github.com/users/4teamwork/received_events","type":"Organization","site_admin":false},"repo":{"id":98294504,"name":"ftw.slacker","full_name":"4teamwork/ftw.slacker","owner":{"login":"4teamwork","id":681821,"avatar_url":"https://avatars2.githubusercontent.com/u/681821?v=4","gravatar_id":"","url":"https://api.github.com/users/4teamwork","html_url":"https://github.com/4teamwork","followers_url":"https://api.github.com/users/4teamwork/followers","following_url":"https://api.github.com/users/4teamwork/following{/other_user}","gists_url":"https://api.github.com/users/4teamwork/gists{/gist_id}","starred_url":"https://api.github.com/users/4teamwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4teamwork/subscriptions","organizations_url":"https://api.github.com/users/4teamwork/orgs","repos_url":"https://api.github.com/users/4teamwork/repos","events_url":"https://api.github.com/users/4teamwork/events{/privacy}","received_events_url":"https://api.github.com/users/4teamwork/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/4teamwork/ftw.slacker","description":"Provides an easy to use api to post messages into a Slack channel through webhooks in Plone.","fork":false,"url":"https://api.github.com/repos/4teamwork/ftw.slacker","forks_url":"https://api.github.com/repos/4teamwork/ftw.slacker/forks","keys_url":"https://api.github.com/repos/4teamwork/ftw.slacker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/4teamwork/ftw.slacker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/4teamwork/ftw.slacker/teams","hooks_url":"https://api.github.com/repos/4teamwork/ftw.slacker/hooks","issue_events_url":"https://api.github.com/repos/4teamwork/ftw.slacker/issues/events{/number}","events_url":"https://api.github.com/repos/4teamwork/ftw.slacker/events","assignees_url":"https://api.github.com/repos/4teamwork/ftw.slacker/assignees{/user}","branches_url":"https://api.github.com/repos/4teamwork/ftw.slacker/branches{/branch}","tags_url":"https://api.github.com/repos/4teamwork/ftw.slacker/tags","blobs_url":"https://api.github.com/repos/4teamwork/ftw.slacker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/4teamwork/ftw.slacker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/4teamwork/ftw.slacker/git/refs{/sha}","trees_url":"https://api.github.com/repos/4teamwork/ftw.slacker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/4teamwork/ftw.slacker/statuses/{sha}","languages_url":"https://api.github.com/repos/4teamwork/ftw.slacker/languages","stargazers_url":"https://api.github.com/repos/4teamwork/ftw.slacker/stargazers","contributors_url":"https://api.github.com/repos/4teamwork/ftw.slacker/contributors","subscribers_url":"https://api.github.com/repos/4teamwork/ftw.slacker/subscribers","subscription_url":"https://api.github.com/repos/4teamwork/ftw.slacker/subscription","commits_url":"https://api.github.com/repos/4teamwork/ftw.slacker/commits{/sha}","git_commits_url":"https://api.github.com/repos/4teamwork/ftw.slacker/git/commits{/sha}","comments_url":"https://api.github.com/repos/4teamwork/ftw.slacker/comments{/number}","issue_comment_url":"https://api.github.com/repos/4teamwork/ftw.slacker/issues/comments{/number}","contents_url":"https://api.github.com/repos/4teamwork/ftw.slacker/contents/{+path}","compare_url":"https://api.github.com/repos/4teamwork/ftw.slacker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/4teamwork/ftw.slacker/merges","archive_url":"https://api.github.com/repos/4teamwork/ftw.slacker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/4teamwork/ftw.slacker/downloads","issues_url":"https://api.github.com/repos/4teamwork/ftw.slacker/issues{/number}","pulls_url":"https://api.github.com/repos/4teamwork/ftw.slacker/pulls{/number}","milestones_url":"https://api.github.com/repos/4teamwork/ftw.slacker/milestones{/number}","notifications_url":"https://api.github.com/repos/4teamwork/ftw.slacker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/4teamwork/ftw.slacker/labels{/name}","releases_url":"https://api.github.com/repos/4teamwork/ftw.slacker/releases{/id}","deployments_url":"https://api.github.com/repos/4teamwork/ftw.slacker/deployments","created_at":"2017-07-25T10:27:18Z","updated_at":"2017-07-26T10:00:10Z","pushed_at":"2017-07-26T10:30:11Z","git_url":"git://github.com/4teamwork/ftw.slacker.git","ssh_url":"git@github.com:4teamwork/ftw.slacker.git","clone_url":"https://github.com/4teamwork/ftw.slacker.git","svn_url":"https://github.com/4teamwork/ftw.slacker","homepage":"","size":11,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":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":"4teamwork:master","ref":"master","sha":"ec9364ea32be2972b1189fbf2ae98ff9baad4755","user":{"login":"4teamwork","id":681821,"avatar_url":"https://avatars2.githubusercontent.com/u/681821?v=4","gravatar_id":"","url":"https://api.github.com/users/4teamwork","html_url":"https://github.com/4teamwork","followers_url":"https://api.github.com/users/4teamwork/followers","following_url":"https://api.github.com/users/4teamwork/following{/other_user}","gists_url":"https://api.github.com/users/4teamwork/gists{/gist_id}","starred_url":"https://api.github.com/users/4teamwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4teamwork/subscriptions","organizations_url":"https://api.github.com/users/4teamwork/orgs","repos_url":"https://api.github.com/users/4teamwork/repos","events_url":"https://api.github.com/users/4teamwork/events{/privacy}","received_events_url":"https://api.github.com/users/4teamwork/received_events","type":"Organization","site_admin":false},"repo":{"id":98294504,"name":"ftw.slacker","full_name":"4teamwork/ftw.slacker","owner":{"login":"4teamwork","id":681821,"avatar_url":"https://avatars2.githubusercontent.com/u/681821?v=4","gravatar_id":"","url":"https://api.github.com/users/4teamwork","html_url":"https://github.com/4teamwork","followers_url":"https://api.github.com/users/4teamwork/followers","following_url":"https://api.github.com/users/4teamwork/following{/other_user}","gists_url":"https://api.github.com/users/4teamwork/gists{/gist_id}","starred_url":"https://api.github.com/users/4teamwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4teamwork/subscriptions","organizations_url":"https://api.github.com/users/4teamwork/orgs","repos_url":"https://api.github.com/users/4teamwork/repos","events_url":"https://api.github.com/users/4teamwork/events{/privacy}","received_events_url":"https://api.github.com/users/4teamwork/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/4teamwork/ftw.slacker","description":"Provides an easy to use api to post messages into a Slack channel through webhooks in Plone.","fork":false,"url":"https://api.github.com/repos/4teamwork/ftw.slacker","forks_url":"https://api.github.com/repos/4teamwork/ftw.slacker/forks","keys_url":"https://api.github.com/repos/4teamwork/ftw.slacker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/4teamwork/ftw.slacker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/4teamwork/ftw.slacker/teams","hooks_url":"https://api.github.com/repos/4teamwork/ftw.slacker/hooks","issue_events_url":"https://api.github.com/repos/4teamwork/ftw.slacker/issues/events{/number}","events_url":"https://api.github.com/repos/4teamwork/ftw.slacker/events","assignees_url":"https://api.github.com/repos/4teamwork/ftw.slacker/assignees{/user}","branches_url":"https://api.github.com/repos/4teamwork/ftw.slacker/branches{/branch}","tags_url":"https://api.github.com/repos/4teamwork/ftw.slacker/tags","blobs_url":"https://api.github.com/repos/4teamwork/ftw.slacker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/4teamwork/ftw.slacker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/4teamwork/ftw.slacker/git/refs{/sha}","trees_url":"https://api.github.com/repos/4teamwork/ftw.slacker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/4teamwork/ftw.slacker/statuses/{sha}","languages_url":"https://api.github.com/repos/4teamwork/ftw.slacker/languages","stargazers_url":"https://api.github.com/repos/4teamwork/ftw.slacker/stargazers","contributors_url":"https://api.github.com/repos/4teamwork/ftw.slacker/contributors","subscribers_url":"https://api.github.com/repos/4teamwork/ftw.slacker/subscribers","subscription_url":"https://api.github.com/repos/4teamwork/ftw.slacker/subscription","commits_url":"https://api.github.com/repos/4teamwork/ftw.slacker/commits{/sha}","git_commits_url":"https://api.github.com/repos/4teamwork/ftw.slacker/git/commits{/sha}","comments_url":"https://api.github.com/repos/4teamwork/ftw.slacker/comments{/number}","issue_comment_url":"https://api.github.com/repos/4teamwork/ftw.slacker/issues/comments{/number}","contents_url":"https://api.github.com/repos/4teamwork/ftw.slacker/contents/{+path}","compare_url":"https://api.github.com/repos/4teamwork/ftw.slacker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/4teamwork/ftw.slacker/merges","archive_url":"https://api.github.com/repos/4teamwork/ftw.slacker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/4teamwork/ftw.slacker/downloads","issues_url":"https://api.github.com/repos/4teamwork/ftw.slacker/issues{/number}","pulls_url":"https://api.github.com/repos/4teamwork/ftw.slacker/pulls{/number}","milestones_url":"https://api.github.com/repos/4teamwork/ftw.slacker/milestones{/number}","notifications_url":"https://api.github.com/repos/4teamwork/ftw.slacker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/4teamwork/ftw.slacker/labels{/name}","releases_url":"https://api.github.com/repos/4teamwork/ftw.slacker/releases{/id}","deployments_url":"https://api.github.com/repos/4teamwork/ftw.slacker/deployments","created_at":"2017-07-25T10:27:18Z","updated_at":"2017-07-26T10:00:10Z","pushed_at":"2017-07-26T10:30:11Z","git_url":"git://github.com/4teamwork/ftw.slacker.git","ssh_url":"git@github.com:4teamwork/ftw.slacker.git","clone_url":"https://github.com/4teamwork/ftw.slacker.git","svn_url":"https://github.com/4teamwork/ftw.slacker","homepage":"","size":11,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":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/4teamwork/ftw.slacker/pulls/1"},"html":{"href":"https://github.com/4teamwork/ftw.slacker/pull/1"},"issue":{"href":"https://api.github.com/repos/4teamwork/ftw.slacker/issues/1"},"comments":{"href":"https://api.github.com/repos/4teamwork/ftw.slacker/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/4teamwork/ftw.slacker/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/4teamwork/ftw.slacker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/4teamwork/ftw.slacker/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/4teamwork/ftw.slacker/statuses/14ba1190f61621c63fe0c6f4760e9d699954acee"}}}}
{"actor":{"display_login":"jone"}}