{"action":"created","comment":{"url":"https://api.github.com/repos/Yipit/awslimits/pulls/comments/88582208","pull_request_review_id":9152785,"id":88582208,"diff_hunk":"@@ -0,0 +1,40 @@\n+import os\n+import sendgrid\n+from flask_script import Manager\n+\n+from server import app\n+from support import get_limits_for_alert, alert_email_body\n+\n+manager = Manager(app)\n+\n+\n+@manager.command\n+def send_alerts():","path":"awslimits/manage.py","position":12,"original_position":12,"commit_id":"1f7e40a0b3c4ed432c304370e20428a42dc5600e","original_commit_id":"1f7e40a0b3c4ed432c304370e20428a42dc5600e","user":{"login":"hltbra","id":61387,"avatar_url":"https://avatars.githubusercontent.com/u/61387?v=3","gravatar_id":"","url":"https://api.github.com/users/hltbra","html_url":"https://github.com/hltbra","followers_url":"https://api.github.com/users/hltbra/followers","following_url":"https://api.github.com/users/hltbra/following{/other_user}","gists_url":"https://api.github.com/users/hltbra/gists{/gist_id}","starred_url":"https://api.github.com/users/hltbra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hltbra/subscriptions","organizations_url":"https://api.github.com/users/hltbra/orgs","repos_url":"https://api.github.com/users/hltbra/repos","events_url":"https://api.github.com/users/hltbra/events{/privacy}","received_events_url":"https://api.github.com/users/hltbra/received_events","type":"User","site_admin":false},"body":"Maybe in the future we should we keep track somehow of things we already notified to avoid spamming people.","created_at":"2016-11-18T01:05:21Z","updated_at":"2016-11-18T01:05:21Z","html_url":"https://github.com/Yipit/awslimits/pull/9#discussion_r88582208","pull_request_url":"https://api.github.com/repos/Yipit/awslimits/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/Yipit/awslimits/pulls/comments/88582208"},"html":{"href":"https://github.com/Yipit/awslimits/pull/9#discussion_r88582208"},"pull_request":{"href":"https://api.github.com/repos/Yipit/awslimits/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/Yipit/awslimits/pulls/9","id":94262971,"html_url":"https://github.com/Yipit/awslimits/pull/9","diff_url":"https://github.com/Yipit/awslimits/pull/9.diff","patch_url":"https://github.com/Yipit/awslimits/pull/9.patch","issue_url":"https://api.github.com/repos/Yipit/awslimits/issues/9","number":9,"state":"open","locked":false,"title":"Alerting","user":{"login":"nadlerjessie","id":13579204,"avatar_url":"https://avatars.githubusercontent.com/u/13579204?v=3","gravatar_id":"","url":"https://api.github.com/users/nadlerjessie","html_url":"https://github.com/nadlerjessie","followers_url":"https://api.github.com/users/nadlerjessie/followers","following_url":"https://api.github.com/users/nadlerjessie/following{/other_user}","gists_url":"https://api.github.com/users/nadlerjessie/gists{/gist_id}","starred_url":"https://api.github.com/users/nadlerjessie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nadlerjessie/subscriptions","organizations_url":"https://api.github.com/users/nadlerjessie/orgs","repos_url":"https://api.github.com/users/nadlerjessie/repos","events_url":"https://api.github.com/users/nadlerjessie/events{/privacy}","received_events_url":"https://api.github.com/users/nadlerjessie/received_events","type":"User","site_admin":false},"body":"@hltbra I created a manager command to be used for alerting. \r\n\r\nRight now it will look at any limit with `limit['percent_used'] > LIMIT_ALERT_PERCENTAGE`. I think we will likely want to only do this for limits that don't have open tickets, rather than continuing to send alerts for limits we have already opened tickets for. We can do this using the status of the tickets but currently all of the `limit_type` values are set to `'unknown'` until we manually edit them.\r\n\r\nLet me know what you think!","created_at":"2016-11-17T22:18:31Z","updated_at":"2016-11-18T01:05:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3f25f9f43d7001db7b5e6fd92ec74b1e9ef4068a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Yipit/awslimits/pulls/9/commits","review_comments_url":"https://api.github.com/repos/Yipit/awslimits/pulls/9/comments","review_comment_url":"https://api.github.com/repos/Yipit/awslimits/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Yipit/awslimits/issues/9/comments","statuses_url":"https://api.github.com/repos/Yipit/awslimits/statuses/1f7e40a0b3c4ed432c304370e20428a42dc5600e","head":{"label":"Yipit:alerting","ref":"alerting","sha":"1f7e40a0b3c4ed432c304370e20428a42dc5600e","user":{"login":"Yipit","id":320154,"avatar_url":"https://avatars.githubusercontent.com/u/320154?v=3","gravatar_id":"","url":"https://api.github.com/users/Yipit","html_url":"https://github.com/Yipit","followers_url":"https://api.github.com/users/Yipit/followers","following_url":"https://api.github.com/users/Yipit/following{/other_user}","gists_url":"https://api.github.com/users/Yipit/gists{/gist_id}","starred_url":"https://api.github.com/users/Yipit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yipit/subscriptions","organizations_url":"https://api.github.com/users/Yipit/orgs","repos_url":"https://api.github.com/users/Yipit/repos","events_url":"https://api.github.com/users/Yipit/events{/privacy}","received_events_url":"https://api.github.com/users/Yipit/received_events","type":"Organization","site_admin":false},"repo":{"id":63818673,"name":"awslimits","full_name":"Yipit/awslimits","owner":{"login":"Yipit","id":320154,"avatar_url":"https://avatars.githubusercontent.com/u/320154?v=3","gravatar_id":"","url":"https://api.github.com/users/Yipit","html_url":"https://github.com/Yipit","followers_url":"https://api.github.com/users/Yipit/followers","following_url":"https://api.github.com/users/Yipit/following{/other_user}","gists_url":"https://api.github.com/users/Yipit/gists{/gist_id}","starred_url":"https://api.github.com/users/Yipit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yipit/subscriptions","organizations_url":"https://api.github.com/users/Yipit/orgs","repos_url":"https://api.github.com/users/Yipit/repos","events_url":"https://api.github.com/users/Yipit/events{/privacy}","received_events_url":"https://api.github.com/users/Yipit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Yipit/awslimits","description":null,"fork":false,"url":"https://api.github.com/repos/Yipit/awslimits","forks_url":"https://api.github.com/repos/Yipit/awslimits/forks","keys_url":"https://api.github.com/repos/Yipit/awslimits/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Yipit/awslimits/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Yipit/awslimits/teams","hooks_url":"https://api.github.com/repos/Yipit/awslimits/hooks","issue_events_url":"https://api.github.com/repos/Yipit/awslimits/issues/events{/number}","events_url":"https://api.github.com/repos/Yipit/awslimits/events","assignees_url":"https://api.github.com/repos/Yipit/awslimits/assignees{/user}","branches_url":"https://api.github.com/repos/Yipit/awslimits/branches{/branch}","tags_url":"https://api.github.com/repos/Yipit/awslimits/tags","blobs_url":"https://api.github.com/repos/Yipit/awslimits/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Yipit/awslimits/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Yipit/awslimits/git/refs{/sha}","trees_url":"https://api.github.com/repos/Yipit/awslimits/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Yipit/awslimits/statuses/{sha}","languages_url":"https://api.github.com/repos/Yipit/awslimits/languages","stargazers_url":"https://api.github.com/repos/Yipit/awslimits/stargazers","contributors_url":"https://api.github.com/repos/Yipit/awslimits/contributors","subscribers_url":"https://api.github.com/repos/Yipit/awslimits/subscribers","subscription_url":"https://api.github.com/repos/Yipit/awslimits/subscription","commits_url":"https://api.github.com/repos/Yipit/awslimits/commits{/sha}","git_commits_url":"https://api.github.com/repos/Yipit/awslimits/git/commits{/sha}","comments_url":"https://api.github.com/repos/Yipit/awslimits/comments{/number}","issue_comment_url":"https://api.github.com/repos/Yipit/awslimits/issues/comments{/number}","contents_url":"https://api.github.com/repos/Yipit/awslimits/contents/{+path}","compare_url":"https://api.github.com/repos/Yipit/awslimits/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Yipit/awslimits/merges","archive_url":"https://api.github.com/repos/Yipit/awslimits/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Yipit/awslimits/downloads","issues_url":"https://api.github.com/repos/Yipit/awslimits/issues{/number}","pulls_url":"https://api.github.com/repos/Yipit/awslimits/pulls{/number}","milestones_url":"https://api.github.com/repos/Yipit/awslimits/milestones{/number}","notifications_url":"https://api.github.com/repos/Yipit/awslimits/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Yipit/awslimits/labels{/name}","releases_url":"https://api.github.com/repos/Yipit/awslimits/releases{/id}","deployments_url":"https://api.github.com/repos/Yipit/awslimits/deployments","created_at":"2016-07-20T22:20:52Z","updated_at":"2016-11-14T20:26:17Z","pushed_at":"2016-11-17T22:18:31Z","git_url":"git://github.com/Yipit/awslimits.git","ssh_url":"git@github.com:Yipit/awslimits.git","clone_url":"https://github.com/Yipit/awslimits.git","svn_url":"https://github.com/Yipit/awslimits","homepage":null,"size":27,"stargazers_count":5,"watchers_count":5,"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":5,"default_branch":"master"}},"base":{"label":"Yipit:master","ref":"master","sha":"18a7c084c3be4a07d77f3a4adbdd573233283eeb","user":{"login":"Yipit","id":320154,"avatar_url":"https://avatars.githubusercontent.com/u/320154?v=3","gravatar_id":"","url":"https://api.github.com/users/Yipit","html_url":"https://github.com/Yipit","followers_url":"https://api.github.com/users/Yipit/followers","following_url":"https://api.github.com/users/Yipit/following{/other_user}","gists_url":"https://api.github.com/users/Yipit/gists{/gist_id}","starred_url":"https://api.github.com/users/Yipit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yipit/subscriptions","organizations_url":"https://api.github.com/users/Yipit/orgs","repos_url":"https://api.github.com/users/Yipit/repos","events_url":"https://api.github.com/users/Yipit/events{/privacy}","received_events_url":"https://api.github.com/users/Yipit/received_events","type":"Organization","site_admin":false},"repo":{"id":63818673,"name":"awslimits","full_name":"Yipit/awslimits","owner":{"login":"Yipit","id":320154,"avatar_url":"https://avatars.githubusercontent.com/u/320154?v=3","gravatar_id":"","url":"https://api.github.com/users/Yipit","html_url":"https://github.com/Yipit","followers_url":"https://api.github.com/users/Yipit/followers","following_url":"https://api.github.com/users/Yipit/following{/other_user}","gists_url":"https://api.github.com/users/Yipit/gists{/gist_id}","starred_url":"https://api.github.com/users/Yipit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yipit/subscriptions","organizations_url":"https://api.github.com/users/Yipit/orgs","repos_url":"https://api.github.com/users/Yipit/repos","events_url":"https://api.github.com/users/Yipit/events{/privacy}","received_events_url":"https://api.github.com/users/Yipit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Yipit/awslimits","description":null,"fork":false,"url":"https://api.github.com/repos/Yipit/awslimits","forks_url":"https://api.github.com/repos/Yipit/awslimits/forks","keys_url":"https://api.github.com/repos/Yipit/awslimits/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Yipit/awslimits/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Yipit/awslimits/teams","hooks_url":"https://api.github.com/repos/Yipit/awslimits/hooks","issue_events_url":"https://api.github.com/repos/Yipit/awslimits/issues/events{/number}","events_url":"https://api.github.com/repos/Yipit/awslimits/events","assignees_url":"https://api.github.com/repos/Yipit/awslimits/assignees{/user}","branches_url":"https://api.github.com/repos/Yipit/awslimits/branches{/branch}","tags_url":"https://api.github.com/repos/Yipit/awslimits/tags","blobs_url":"https://api.github.com/repos/Yipit/awslimits/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Yipit/awslimits/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Yipit/awslimits/git/refs{/sha}","trees_url":"https://api.github.com/repos/Yipit/awslimits/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Yipit/awslimits/statuses/{sha}","languages_url":"https://api.github.com/repos/Yipit/awslimits/languages","stargazers_url":"https://api.github.com/repos/Yipit/awslimits/stargazers","contributors_url":"https://api.github.com/repos/Yipit/awslimits/contributors","subscribers_url":"https://api.github.com/repos/Yipit/awslimits/subscribers","subscription_url":"https://api.github.com/repos/Yipit/awslimits/subscription","commits_url":"https://api.github.com/repos/Yipit/awslimits/commits{/sha}","git_commits_url":"https://api.github.com/repos/Yipit/awslimits/git/commits{/sha}","comments_url":"https://api.github.com/repos/Yipit/awslimits/comments{/number}","issue_comment_url":"https://api.github.com/repos/Yipit/awslimits/issues/comments{/number}","contents_url":"https://api.github.com/repos/Yipit/awslimits/contents/{+path}","compare_url":"https://api.github.com/repos/Yipit/awslimits/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Yipit/awslimits/merges","archive_url":"https://api.github.com/repos/Yipit/awslimits/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Yipit/awslimits/downloads","issues_url":"https://api.github.com/repos/Yipit/awslimits/issues{/number}","pulls_url":"https://api.github.com/repos/Yipit/awslimits/pulls{/number}","milestones_url":"https://api.github.com/repos/Yipit/awslimits/milestones{/number}","notifications_url":"https://api.github.com/repos/Yipit/awslimits/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Yipit/awslimits/labels{/name}","releases_url":"https://api.github.com/repos/Yipit/awslimits/releases{/id}","deployments_url":"https://api.github.com/repos/Yipit/awslimits/deployments","created_at":"2016-07-20T22:20:52Z","updated_at":"2016-11-14T20:26:17Z","pushed_at":"2016-11-17T22:18:31Z","git_url":"git://github.com/Yipit/awslimits.git","ssh_url":"git@github.com:Yipit/awslimits.git","clone_url":"https://github.com/Yipit/awslimits.git","svn_url":"https://github.com/Yipit/awslimits","homepage":null,"size":27,"stargazers_count":5,"watchers_count":5,"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":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Yipit/awslimits/pulls/9"},"html":{"href":"https://github.com/Yipit/awslimits/pull/9"},"issue":{"href":"https://api.github.com/repos/Yipit/awslimits/issues/9"},"comments":{"href":"https://api.github.com/repos/Yipit/awslimits/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/Yipit/awslimits/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/Yipit/awslimits/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Yipit/awslimits/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/Yipit/awslimits/statuses/1f7e40a0b3c4ed432c304370e20428a42dc5600e"}}}}
{"actor":{"display_login":"hltbra"}}