{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/pulls/comments/239983997","pull_request_review_id":182919969,"id":239983997,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTk4Mzk5Nw==","diff_hunk":"@@ -0,0 +1,113 @@\n+# Copyright 2018 Google LLC\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# You may obtain a copy of the License at\n+#\n+#     https://www.apache.org/licenses/LICENSE-2.0\n+#\n+# Unless required by applicable law or agreed to in writing, software\n+# distributed under the License is distributed on an \"AS IS\" BASIS,\n+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+# See the License for the specific language governing permissions and\n+# limitations under the License.\n+\"\"\"A module handles crashes of the tool.\"\"\"\n+\n+import os\n+import platform\n+import subprocess\n+import sys\n+import traceback\n+import urllib.parse\n+import webbrowser\n+\n+import jinja2\n+\n+from django_cloud_deploy.cli import io\n+from django_cloud_deploy import __version__\n+\n+# TODO: Add an issue label for issues reported by users\n+_REQUEST_URL_TEMPLATE = (\n+    ('https://github.com/GoogleCloudPlatform/django-cloud-deploy/issues/new?'\n+     'body={}'))\n+\n+\n+with open(os.path.join(os.path.dirname(__file__), 'template',\n+                       'issue_template.txt')) as f:\n+    _ISSUE_TEMPLATE = f.read()\n+\n+\n+def handle_crash(err: Exception, command: str,\n+                 console: io.IO = io.ConsoleIO()):\n+    \"\"\"The tool's crashing handler.\n+\n+    Args:\n+        err: The exception get thrown.\n+        command: The command causing the exception to get thrown.","path":"django_cloud_deploy/crash_handling/__init__.py","position":46,"original_position":46,"commit_id":"59f17f9eebbae8b78b382b300ff8ca25f1056217","original_commit_id":"59f17f9eebbae8b78b382b300ff8ca25f1056217","user":{"login":"brianquinlan","id":8851008,"node_id":"MDQ6VXNlcjg4NTEwMDg=","avatar_url":"https://avatars2.githubusercontent.com/u/8851008?v=4","gravatar_id":"","url":"https://api.github.com/users/brianquinlan","html_url":"https://github.com/brianquinlan","followers_url":"https://api.github.com/users/brianquinlan/followers","following_url":"https://api.github.com/users/brianquinlan/following{/other_user}","gists_url":"https://api.github.com/users/brianquinlan/gists{/gist_id}","starred_url":"https://api.github.com/users/brianquinlan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianquinlan/subscriptions","organizations_url":"https://api.github.com/users/brianquinlan/orgs","repos_url":"https://api.github.com/users/brianquinlan/repos","events_url":"https://api.github.com/users/brianquinlan/events{/privacy}","received_events_url":"https://api.github.com/users/brianquinlan/received_events","type":"User","site_admin":false},"body":"```suggestion\r\n        command: The command causing the exception to get thrown\r\n            e.g. 'django-cloud-deploy new'.\r\n```","created_at":"2018-12-08T00:45:06Z","updated_at":"2018-12-08T00:59:43Z","html_url":"https://github.com/GoogleCloudPlatform/django-cloud-deploy/pull/131#discussion_r239983997","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/pulls/131","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/pulls/comments/239983997"},"html":{"href":"https://github.com/GoogleCloudPlatform/django-cloud-deploy/pull/131#discussion_r239983997"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/pulls/131"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/pulls/131","id":236710190,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM2NzEwMTkw","html_url":"https://github.com/GoogleCloudPlatform/django-cloud-deploy/pull/131","diff_url":"https://github.com/GoogleCloudPlatform/django-cloud-deploy/pull/131.diff","patch_url":"https://github.com/GoogleCloudPlatform/django-cloud-deploy/pull/131.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/issues/131","number":131,"state":"open","locked":false,"title":"Direct users to create a Github issue if the tool crashes","user":{"login":"wangxf123456","id":6218006,"node_id":"MDQ6VXNlcjYyMTgwMDY=","avatar_url":"https://avatars3.githubusercontent.com/u/6218006?v=4","gravatar_id":"","url":"https://api.github.com/users/wangxf123456","html_url":"https://github.com/wangxf123456","followers_url":"https://api.github.com/users/wangxf123456/followers","following_url":"https://api.github.com/users/wangxf123456/following{/other_user}","gists_url":"https://api.github.com/users/wangxf123456/gists{/gist_id}","starred_url":"https://api.github.com/users/wangxf123456/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangxf123456/subscriptions","organizations_url":"https://api.github.com/users/wangxf123456/orgs","repos_url":"https://api.github.com/users/wangxf123456/repos","events_url":"https://api.github.com/users/wangxf123456/events{/privacy}","received_events_url":"https://api.github.com/users/wangxf123456/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-12-06T23:43:42Z","updated_at":"2018-12-08T00:59:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"17ed9cd58a551d8affc69ad1951ad50cd8a02624","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1103584327,"node_id":"MDU6TGFiZWwxMTAzNTg0MzI3","url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/labels/cla:%20yes","name":"cla: yes","color":"c2e0c6","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/pulls/131/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/pulls/131/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/issues/131/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/statuses/59f17f9eebbae8b78b382b300ff8ca25f1056217","head":{"label":"GoogleCloudPlatform:error-handler","ref":"error-handler","sha":"59f17f9eebbae8b78b382b300ff8ca25f1056217","user":{"login":"GoogleCloudPlatform","id":2810941,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MTA5NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":153157026,"node_id":"MDEwOlJlcG9zaXRvcnkxNTMxNTcwMjY=","name":"django-cloud-deploy","full_name":"GoogleCloudPlatform/django-cloud-deploy","private":false,"owner":{"login":"GoogleCloudPlatform","id":2810941,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MTA5NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/GoogleCloudPlatform/django-cloud-deploy","description":"Easier deployment of Django applications in the cloud.","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/deployments","created_at":"2018-10-15T17:47:54Z","updated_at":"2018-12-07T23:44:08Z","pushed_at":"2018-12-07T23:49:43Z","git_url":"git://github.com/GoogleCloudPlatform/django-cloud-deploy.git","ssh_url":"git@github.com:GoogleCloudPlatform/django-cloud-deploy.git","clone_url":"https://github.com/GoogleCloudPlatform/django-cloud-deploy.git","svn_url":"https://github.com/GoogleCloudPlatform/django-cloud-deploy","homepage":"","size":401,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":22,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1,"open_issues":22,"watchers":5,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"bf914225ec9923d39dd3a1e83b524957ef004190","user":{"login":"GoogleCloudPlatform","id":2810941,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MTA5NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":153157026,"node_id":"MDEwOlJlcG9zaXRvcnkxNTMxNTcwMjY=","name":"django-cloud-deploy","full_name":"GoogleCloudPlatform/django-cloud-deploy","private":false,"owner":{"login":"GoogleCloudPlatform","id":2810941,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MTA5NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/GoogleCloudPlatform/django-cloud-deploy","description":"Easier deployment of Django applications in the cloud.","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/deployments","created_at":"2018-10-15T17:47:54Z","updated_at":"2018-12-07T23:44:08Z","pushed_at":"2018-12-07T23:49:43Z","git_url":"git://github.com/GoogleCloudPlatform/django-cloud-deploy.git","ssh_url":"git@github.com:GoogleCloudPlatform/django-cloud-deploy.git","clone_url":"https://github.com/GoogleCloudPlatform/django-cloud-deploy.git","svn_url":"https://github.com/GoogleCloudPlatform/django-cloud-deploy","homepage":"","size":401,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":22,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1,"open_issues":22,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/pulls/131"},"html":{"href":"https://github.com/GoogleCloudPlatform/django-cloud-deploy/pull/131"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/issues/131"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/issues/131/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/pulls/131/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/pulls/131/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/django-cloud-deploy/statuses/59f17f9eebbae8b78b382b300ff8ca25f1056217"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"brianquinlan"}}