{"action":"created","comment":{"url":"https://api.github.com/repos/seomoz/roger-mesos-tools/pulls/comments/72298447","id":72298447,"diff_hunk":"@@ -0,0 +1,125 @@\n+import slackweb\n+from sets import Set\n+from datetime import datetime\n+from slackclient import SlackClient\n+\n+from cli.settings import Settings\n+from cli.appconfig import AppConfig\n+\n+\n+class WebHook:\n+\n+    def __init__(self):\n+        self.disabled = True\n+        self.emoji = ':rocket:'\n+        self.defChannel = ''\n+        self.username = 'rogeros-deploy-bot'\n+        self.settingObj = Settings()\n+        self.appconfigObj = AppConfig()\n+\n+    def webhookSetting(self):\n+        try:\n+            config_dir = self.settingObj.getConfigDir()\n+            roger_env = self.appconfigObj.getRogerEnv(config_dir)\n+            if 'slack_webhook_url' in roger_env.keys():\n+                self.webhookURL = roger_env['slack_webhook_url']\n+            if 'slack_api_token' in roger_env.keys():\n+                self.token = roger_env['slack_api_token']\n+            if 'default_slack_channel' in roger_env.keys():","path":"cli/webhook.py","position":28,"original_position":28,"commit_id":"5eb85834f5a09bee24d347904ed4b45ce925fffe","original_commit_id":"5eb85834f5a09bee24d347904ed4b45ce925fffe","user":{"login":"ankanm","id":558066,"avatar_url":"https://avatars.githubusercontent.com/u/558066?v=3","gravatar_id":"","url":"https://api.github.com/users/ankanm","html_url":"https://github.com/ankanm","followers_url":"https://api.github.com/users/ankanm/followers","following_url":"https://api.github.com/users/ankanm/following{/other_user}","gists_url":"https://api.github.com/users/ankanm/gists{/gist_id}","starred_url":"https://api.github.com/users/ankanm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ankanm/subscriptions","organizations_url":"https://api.github.com/users/ankanm/orgs","repos_url":"https://api.github.com/users/ankanm/repos","events_url":"https://api.github.com/users/ankanm/events{/privacy}","received_events_url":"https://api.github.com/users/ankanm/received_events","type":"User","site_admin":false},"body":"minor - Consider renaming this to `slack_default_channel` to be consistent with the other vars.","created_at":"2016-07-26T17:34:01Z","updated_at":"2016-07-26T17:34:01Z","html_url":"https://github.com/seomoz/roger-mesos-tools/pull/91#discussion_r72298447","pull_request_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/pulls/91","_links":{"self":{"href":"https://api.github.com/repos/seomoz/roger-mesos-tools/pulls/comments/72298447"},"html":{"href":"https://github.com/seomoz/roger-mesos-tools/pull/91#discussion_r72298447"},"pull_request":{"href":"https://api.github.com/repos/seomoz/roger-mesos-tools/pulls/91"}}},"pull_request":{"url":"https://api.github.com/repos/seomoz/roger-mesos-tools/pulls/91","id":77686783,"html_url":"https://github.com/seomoz/roger-mesos-tools/pull/91","diff_url":"https://github.com/seomoz/roger-mesos-tools/pull/91.diff","patch_url":"https://github.com/seomoz/roger-mesos-tools/pull/91.patch","issue_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/issues/91","number":91,"state":"open","locked":false,"title":"Manish/roger 1080","user":{"login":"ranjanmanish","id":1888190,"avatar_url":"https://avatars.githubusercontent.com/u/1888190?v=3","gravatar_id":"","url":"https://api.github.com/users/ranjanmanish","html_url":"https://github.com/ranjanmanish","followers_url":"https://api.github.com/users/ranjanmanish/followers","following_url":"https://api.github.com/users/ranjanmanish/following{/other_user}","gists_url":"https://api.github.com/users/ranjanmanish/gists{/gist_id}","starred_url":"https://api.github.com/users/ranjanmanish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ranjanmanish/subscriptions","organizations_url":"https://api.github.com/users/ranjanmanish/orgs","repos_url":"https://api.github.com/users/ranjanmanish/repos","events_url":"https://api.github.com/users/ranjanmanish/events{/privacy}","received_events_url":"https://api.github.com/users/ranjanmanish/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-15T22:22:13Z","updated_at":"2016-07-26T17:34:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6ba2a6a8e1e5a28bcc9d3251671fdb608bc4b325","assignee":{"login":"ankanm","id":558066,"avatar_url":"https://avatars.githubusercontent.com/u/558066?v=3","gravatar_id":"","url":"https://api.github.com/users/ankanm","html_url":"https://github.com/ankanm","followers_url":"https://api.github.com/users/ankanm/followers","following_url":"https://api.github.com/users/ankanm/following{/other_user}","gists_url":"https://api.github.com/users/ankanm/gists{/gist_id}","starred_url":"https://api.github.com/users/ankanm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ankanm/subscriptions","organizations_url":"https://api.github.com/users/ankanm/orgs","repos_url":"https://api.github.com/users/ankanm/repos","events_url":"https://api.github.com/users/ankanm/events{/privacy}","received_events_url":"https://api.github.com/users/ankanm/received_events","type":"User","site_admin":false},"assignees":[{"login":"ankanm","id":558066,"avatar_url":"https://avatars.githubusercontent.com/u/558066?v=3","gravatar_id":"","url":"https://api.github.com/users/ankanm","html_url":"https://github.com/ankanm","followers_url":"https://api.github.com/users/ankanm/followers","following_url":"https://api.github.com/users/ankanm/following{/other_user}","gists_url":"https://api.github.com/users/ankanm/gists{/gist_id}","starred_url":"https://api.github.com/users/ankanm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ankanm/subscriptions","organizations_url":"https://api.github.com/users/ankanm/orgs","repos_url":"https://api.github.com/users/ankanm/repos","events_url":"https://api.github.com/users/ankanm/events{/privacy}","received_events_url":"https://api.github.com/users/ankanm/received_events","type":"User","site_admin":false},{"login":"ranjanmanish","id":1888190,"avatar_url":"https://avatars.githubusercontent.com/u/1888190?v=3","gravatar_id":"","url":"https://api.github.com/users/ranjanmanish","html_url":"https://github.com/ranjanmanish","followers_url":"https://api.github.com/users/ranjanmanish/followers","following_url":"https://api.github.com/users/ranjanmanish/following{/other_user}","gists_url":"https://api.github.com/users/ranjanmanish/gists{/gist_id}","starred_url":"https://api.github.com/users/ranjanmanish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ranjanmanish/subscriptions","organizations_url":"https://api.github.com/users/ranjanmanish/orgs","repos_url":"https://api.github.com/users/ranjanmanish/repos","events_url":"https://api.github.com/users/ranjanmanish/events{/privacy}","received_events_url":"https://api.github.com/users/ranjanmanish/received_events","type":"User","site_admin":false},{"login":"04msambit","id":2840953,"avatar_url":"https://avatars.githubusercontent.com/u/2840953?v=3","gravatar_id":"","url":"https://api.github.com/users/04msambit","html_url":"https://github.com/04msambit","followers_url":"https://api.github.com/users/04msambit/followers","following_url":"https://api.github.com/users/04msambit/following{/other_user}","gists_url":"https://api.github.com/users/04msambit/gists{/gist_id}","starred_url":"https://api.github.com/users/04msambit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/04msambit/subscriptions","organizations_url":"https://api.github.com/users/04msambit/orgs","repos_url":"https://api.github.com/users/04msambit/repos","events_url":"https://api.github.com/users/04msambit/events{/privacy}","received_events_url":"https://api.github.com/users/04msambit/received_events","type":"User","site_admin":false},{"login":"amitbose327","id":13841431,"avatar_url":"https://avatars.githubusercontent.com/u/13841431?v=3","gravatar_id":"","url":"https://api.github.com/users/amitbose327","html_url":"https://github.com/amitbose327","followers_url":"https://api.github.com/users/amitbose327/followers","following_url":"https://api.github.com/users/amitbose327/following{/other_user}","gists_url":"https://api.github.com/users/amitbose327/gists{/gist_id}","starred_url":"https://api.github.com/users/amitbose327/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amitbose327/subscriptions","organizations_url":"https://api.github.com/users/amitbose327/orgs","repos_url":"https://api.github.com/users/amitbose327/repos","events_url":"https://api.github.com/users/amitbose327/events{/privacy}","received_events_url":"https://api.github.com/users/amitbose327/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/pulls/91/commits","review_comments_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/pulls/91/comments","review_comment_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/issues/91/comments","statuses_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/statuses/5eb85834f5a09bee24d347904ed4b45ce925fffe","head":{"label":"seomoz:manish/ROGER-1080","ref":"manish/ROGER-1080","sha":"5eb85834f5a09bee24d347904ed4b45ce925fffe","user":{"login":"seomoz","id":104895,"avatar_url":"https://avatars.githubusercontent.com/u/104895?v=3","gravatar_id":"","url":"https://api.github.com/users/seomoz","html_url":"https://github.com/seomoz","followers_url":"https://api.github.com/users/seomoz/followers","following_url":"https://api.github.com/users/seomoz/following{/other_user}","gists_url":"https://api.github.com/users/seomoz/gists{/gist_id}","starred_url":"https://api.github.com/users/seomoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seomoz/subscriptions","organizations_url":"https://api.github.com/users/seomoz/orgs","repos_url":"https://api.github.com/users/seomoz/repos","events_url":"https://api.github.com/users/seomoz/events{/privacy}","received_events_url":"https://api.github.com/users/seomoz/received_events","type":"Organization","site_admin":false},"repo":{"id":52420584,"name":"roger-mesos-tools","full_name":"seomoz/roger-mesos-tools","owner":{"login":"seomoz","id":104895,"avatar_url":"https://avatars.githubusercontent.com/u/104895?v=3","gravatar_id":"","url":"https://api.github.com/users/seomoz","html_url":"https://github.com/seomoz","followers_url":"https://api.github.com/users/seomoz/followers","following_url":"https://api.github.com/users/seomoz/following{/other_user}","gists_url":"https://api.github.com/users/seomoz/gists{/gist_id}","starred_url":"https://api.github.com/users/seomoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seomoz/subscriptions","organizations_url":"https://api.github.com/users/seomoz/orgs","repos_url":"https://api.github.com/users/seomoz/repos","events_url":"https://api.github.com/users/seomoz/events{/privacy}","received_events_url":"https://api.github.com/users/seomoz/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/seomoz/roger-mesos-tools","description":"Tools to interact with RogerOS (roger-mesos)","fork":false,"url":"https://api.github.com/repos/seomoz/roger-mesos-tools","forks_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/forks","keys_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/teams","hooks_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/hooks","issue_events_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/issues/events{/number}","events_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/events","assignees_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/assignees{/user}","branches_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/branches{/branch}","tags_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/tags","blobs_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/languages","stargazers_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/stargazers","contributors_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/contributors","subscribers_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/subscribers","subscription_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/subscription","commits_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/contents/{+path}","compare_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/merges","archive_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/downloads","issues_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/issues{/number}","pulls_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/labels{/name}","releases_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/releases{/id}","deployments_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/deployments","created_at":"2016-02-24T06:42:19Z","updated_at":"2016-05-23T17:58:22Z","pushed_at":"2016-07-26T06:27:50Z","git_url":"git://github.com/seomoz/roger-mesos-tools.git","ssh_url":"git@github.com:seomoz/roger-mesos-tools.git","clone_url":"https://github.com/seomoz/roger-mesos-tools.git","svn_url":"https://github.com/seomoz/roger-mesos-tools","homepage":"","size":592,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"seomoz:master","ref":"master","sha":"3fcb8a84c2022c755ff54c02eda05ae875031783","user":{"login":"seomoz","id":104895,"avatar_url":"https://avatars.githubusercontent.com/u/104895?v=3","gravatar_id":"","url":"https://api.github.com/users/seomoz","html_url":"https://github.com/seomoz","followers_url":"https://api.github.com/users/seomoz/followers","following_url":"https://api.github.com/users/seomoz/following{/other_user}","gists_url":"https://api.github.com/users/seomoz/gists{/gist_id}","starred_url":"https://api.github.com/users/seomoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seomoz/subscriptions","organizations_url":"https://api.github.com/users/seomoz/orgs","repos_url":"https://api.github.com/users/seomoz/repos","events_url":"https://api.github.com/users/seomoz/events{/privacy}","received_events_url":"https://api.github.com/users/seomoz/received_events","type":"Organization","site_admin":false},"repo":{"id":52420584,"name":"roger-mesos-tools","full_name":"seomoz/roger-mesos-tools","owner":{"login":"seomoz","id":104895,"avatar_url":"https://avatars.githubusercontent.com/u/104895?v=3","gravatar_id":"","url":"https://api.github.com/users/seomoz","html_url":"https://github.com/seomoz","followers_url":"https://api.github.com/users/seomoz/followers","following_url":"https://api.github.com/users/seomoz/following{/other_user}","gists_url":"https://api.github.com/users/seomoz/gists{/gist_id}","starred_url":"https://api.github.com/users/seomoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seomoz/subscriptions","organizations_url":"https://api.github.com/users/seomoz/orgs","repos_url":"https://api.github.com/users/seomoz/repos","events_url":"https://api.github.com/users/seomoz/events{/privacy}","received_events_url":"https://api.github.com/users/seomoz/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/seomoz/roger-mesos-tools","description":"Tools to interact with RogerOS (roger-mesos)","fork":false,"url":"https://api.github.com/repos/seomoz/roger-mesos-tools","forks_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/forks","keys_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/teams","hooks_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/hooks","issue_events_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/issues/events{/number}","events_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/events","assignees_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/assignees{/user}","branches_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/branches{/branch}","tags_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/tags","blobs_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/languages","stargazers_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/stargazers","contributors_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/contributors","subscribers_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/subscribers","subscription_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/subscription","commits_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/contents/{+path}","compare_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/merges","archive_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/downloads","issues_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/issues{/number}","pulls_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/labels{/name}","releases_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/releases{/id}","deployments_url":"https://api.github.com/repos/seomoz/roger-mesos-tools/deployments","created_at":"2016-02-24T06:42:19Z","updated_at":"2016-05-23T17:58:22Z","pushed_at":"2016-07-26T06:27:50Z","git_url":"git://github.com/seomoz/roger-mesos-tools.git","ssh_url":"git@github.com:seomoz/roger-mesos-tools.git","clone_url":"https://github.com/seomoz/roger-mesos-tools.git","svn_url":"https://github.com/seomoz/roger-mesos-tools","homepage":"","size":592,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/seomoz/roger-mesos-tools/pulls/91"},"html":{"href":"https://github.com/seomoz/roger-mesos-tools/pull/91"},"issue":{"href":"https://api.github.com/repos/seomoz/roger-mesos-tools/issues/91"},"comments":{"href":"https://api.github.com/repos/seomoz/roger-mesos-tools/issues/91/comments"},"review_comments":{"href":"https://api.github.com/repos/seomoz/roger-mesos-tools/pulls/91/comments"},"review_comment":{"href":"https://api.github.com/repos/seomoz/roger-mesos-tools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/seomoz/roger-mesos-tools/pulls/91/commits"},"statuses":{"href":"https://api.github.com/repos/seomoz/roger-mesos-tools/statuses/5eb85834f5a09bee24d347904ed4b45ce925fffe"}}}}
{"actor":{"display_login":"ankanm"}}