{"action":"created","comment":{"url":"https://api.github.com/repos/getsentry/sentry/pulls/comments/202832757","pull_request_review_id":137606905,"id":202832757,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMjgzMjc1Nw==","diff_hunk":"@@ -225,23 +225,29 @@ def build_integration(self, state):\n             identity['access_token'],\n             state['installation_id'])\n \n+        domain_name = installation['account']['html_url'].replace('https://', '').split(\"/\")[0]","path":"src/sentry/integrations/github_enterprise/integration.py","position":13,"original_position":13,"commit_id":"225ae16606d2357d0ab4ba0abc845d5e6836ed9a","original_commit_id":"225ae16606d2357d0ab4ba0abc845d5e6836ed9a","user":{"login":"EvanPurkhiser","id":1421724,"node_id":"MDQ6VXNlcjE0MjE3MjQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1421724?v=4","gravatar_id":"","url":"https://api.github.com/users/EvanPurkhiser","html_url":"https://github.com/EvanPurkhiser","followers_url":"https://api.github.com/users/EvanPurkhiser/followers","following_url":"https://api.github.com/users/EvanPurkhiser/following{/other_user}","gists_url":"https://api.github.com/users/EvanPurkhiser/gists{/gist_id}","starred_url":"https://api.github.com/users/EvanPurkhiser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EvanPurkhiser/subscriptions","organizations_url":"https://api.github.com/users/EvanPurkhiser/orgs","repos_url":"https://api.github.com/users/EvanPurkhiser/repos","events_url":"https://api.github.com/users/EvanPurkhiser/events{/privacy}","received_events_url":"https://api.github.com/users/EvanPurkhiser/received_events","type":"User","site_admin":false},"body":"We should probably just use [`urlparse`](https://docs.python.org/2/library/urlparse.html) for this.\r\n\r\nAlso in the metadata we probably don't want to trim the organization / user name, since the domain name is mostly for visual purposes in the metadata.","created_at":"2018-07-16T21:37:36Z","updated_at":"2018-07-16T21:37:36Z","html_url":"https://github.com/getsentry/sentry/pull/9037#discussion_r202832757","pull_request_url":"https://api.github.com/repos/getsentry/sentry/pulls/9037","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/getsentry/sentry/pulls/comments/202832757"},"html":{"href":"https://github.com/getsentry/sentry/pull/9037#discussion_r202832757"},"pull_request":{"href":"https://api.github.com/repos/getsentry/sentry/pulls/9037"}}},"pull_request":{"url":"https://api.github.com/repos/getsentry/sentry/pulls/9037","id":201354758,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxMzU0NzU4","html_url":"https://github.com/getsentry/sentry/pull/9037","diff_url":"https://github.com/getsentry/sentry/pull/9037.diff","patch_url":"https://github.com/getsentry/sentry/pull/9037.patch","issue_url":"https://api.github.com/repos/getsentry/sentry/issues/9037","number":9037,"state":"open","locked":false,"title":"fix(integrations): Make external IDs unique across GHE installations","user":{"login":"MeredithAnya","id":15368179,"node_id":"MDQ6VXNlcjE1MzY4MTc5","avatar_url":"https://avatars0.githubusercontent.com/u/15368179?v=4","gravatar_id":"","url":"https://api.github.com/users/MeredithAnya","html_url":"https://github.com/MeredithAnya","followers_url":"https://api.github.com/users/MeredithAnya/followers","following_url":"https://api.github.com/users/MeredithAnya/following{/other_user}","gists_url":"https://api.github.com/users/MeredithAnya/gists{/gist_id}","starred_url":"https://api.github.com/users/MeredithAnya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MeredithAnya/subscriptions","organizations_url":"https://api.github.com/users/MeredithAnya/orgs","repos_url":"https://api.github.com/users/MeredithAnya/repos","events_url":"https://api.github.com/users/MeredithAnya/events{/privacy}","received_events_url":"https://api.github.com/users/MeredithAnya/received_events","type":"User","site_admin":false},"body":"This prefixes the following: \r\n* integration `external_id`\r\n* integration `idp_external_id`\r\n* user identity `external_id`\r\n\r\nwith the host for GHE installations so that they're now globally unique.\r\n\r\ncc @adhiraj ","created_at":"2018-07-13T17:34:28Z","updated_at":"2018-07-16T21:37:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ee2ebbbc8df7dede6d9a3d30a90e2a89b93aa11d","assignee":null,"assignees":[],"requested_reviewers":[{"login":"macqueen","id":5026776,"node_id":"MDQ6VXNlcjUwMjY3NzY=","avatar_url":"https://avatars2.githubusercontent.com/u/5026776?v=4","gravatar_id":"","url":"https://api.github.com/users/macqueen","html_url":"https://github.com/macqueen","followers_url":"https://api.github.com/users/macqueen/followers","following_url":"https://api.github.com/users/macqueen/following{/other_user}","gists_url":"https://api.github.com/users/macqueen/gists{/gist_id}","starred_url":"https://api.github.com/users/macqueen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macqueen/subscriptions","organizations_url":"https://api.github.com/users/macqueen/orgs","repos_url":"https://api.github.com/users/macqueen/repos","events_url":"https://api.github.com/users/macqueen/events{/privacy}","received_events_url":"https://api.github.com/users/macqueen/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/getsentry/sentry/pulls/9037/commits","review_comments_url":"https://api.github.com/repos/getsentry/sentry/pulls/9037/comments","review_comment_url":"https://api.github.com/repos/getsentry/sentry/pulls/comments{/number}","comments_url":"https://api.github.com/repos/getsentry/sentry/issues/9037/comments","statuses_url":"https://api.github.com/repos/getsentry/sentry/statuses/225ae16606d2357d0ab4ba0abc845d5e6836ed9a","head":{"label":"getsentry:fix-externalid-ghe","ref":"fix-externalid-ghe","sha":"225ae16606d2357d0ab4ba0abc845d5e6836ed9a","user":{"login":"getsentry","id":1396951,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzOTY5NTE=","avatar_url":"https://avatars0.githubusercontent.com/u/1396951?v=4","gravatar_id":"","url":"https://api.github.com/users/getsentry","html_url":"https://github.com/getsentry","followers_url":"https://api.github.com/users/getsentry/followers","following_url":"https://api.github.com/users/getsentry/following{/other_user}","gists_url":"https://api.github.com/users/getsentry/gists{/gist_id}","starred_url":"https://api.github.com/users/getsentry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getsentry/subscriptions","organizations_url":"https://api.github.com/users/getsentry/orgs","repos_url":"https://api.github.com/users/getsentry/repos","events_url":"https://api.github.com/users/getsentry/events{/privacy}","received_events_url":"https://api.github.com/users/getsentry/received_events","type":"Organization","site_admin":false},"repo":{"id":873328,"node_id":"MDEwOlJlcG9zaXRvcnk4NzMzMjg=","name":"sentry","full_name":"getsentry/sentry","owner":{"login":"getsentry","id":1396951,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzOTY5NTE=","avatar_url":"https://avatars0.githubusercontent.com/u/1396951?v=4","gravatar_id":"","url":"https://api.github.com/users/getsentry","html_url":"https://github.com/getsentry","followers_url":"https://api.github.com/users/getsentry/followers","following_url":"https://api.github.com/users/getsentry/following{/other_user}","gists_url":"https://api.github.com/users/getsentry/gists{/gist_id}","starred_url":"https://api.github.com/users/getsentry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getsentry/subscriptions","organizations_url":"https://api.github.com/users/getsentry/orgs","repos_url":"https://api.github.com/users/getsentry/repos","events_url":"https://api.github.com/users/getsentry/events{/privacy}","received_events_url":"https://api.github.com/users/getsentry/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/getsentry/sentry","description":"Sentry is cross-platform application monitoring, with a focus on error reporting.","fork":false,"url":"https://api.github.com/repos/getsentry/sentry","forks_url":"https://api.github.com/repos/getsentry/sentry/forks","keys_url":"https://api.github.com/repos/getsentry/sentry/keys{/key_id}","collaborators_url":"https://api.github.com/repos/getsentry/sentry/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/getsentry/sentry/teams","hooks_url":"https://api.github.com/repos/getsentry/sentry/hooks","issue_events_url":"https://api.github.com/repos/getsentry/sentry/issues/events{/number}","events_url":"https://api.github.com/repos/getsentry/sentry/events","assignees_url":"https://api.github.com/repos/getsentry/sentry/assignees{/user}","branches_url":"https://api.github.com/repos/getsentry/sentry/branches{/branch}","tags_url":"https://api.github.com/repos/getsentry/sentry/tags","blobs_url":"https://api.github.com/repos/getsentry/sentry/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/getsentry/sentry/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/getsentry/sentry/git/refs{/sha}","trees_url":"https://api.github.com/repos/getsentry/sentry/git/trees{/sha}","statuses_url":"https://api.github.com/repos/getsentry/sentry/statuses/{sha}","languages_url":"https://api.github.com/repos/getsentry/sentry/languages","stargazers_url":"https://api.github.com/repos/getsentry/sentry/stargazers","contributors_url":"https://api.github.com/repos/getsentry/sentry/contributors","subscribers_url":"https://api.github.com/repos/getsentry/sentry/subscribers","subscription_url":"https://api.github.com/repos/getsentry/sentry/subscription","commits_url":"https://api.github.com/repos/getsentry/sentry/commits{/sha}","git_commits_url":"https://api.github.com/repos/getsentry/sentry/git/commits{/sha}","comments_url":"https://api.github.com/repos/getsentry/sentry/comments{/number}","issue_comment_url":"https://api.github.com/repos/getsentry/sentry/issues/comments{/number}","contents_url":"https://api.github.com/repos/getsentry/sentry/contents/{+path}","compare_url":"https://api.github.com/repos/getsentry/sentry/compare/{base}...{head}","merges_url":"https://api.github.com/repos/getsentry/sentry/merges","archive_url":"https://api.github.com/repos/getsentry/sentry/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/getsentry/sentry/downloads","issues_url":"https://api.github.com/repos/getsentry/sentry/issues{/number}","pulls_url":"https://api.github.com/repos/getsentry/sentry/pulls{/number}","milestones_url":"https://api.github.com/repos/getsentry/sentry/milestones{/number}","notifications_url":"https://api.github.com/repos/getsentry/sentry/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/getsentry/sentry/labels{/name}","releases_url":"https://api.github.com/repos/getsentry/sentry/releases{/id}","deployments_url":"https://api.github.com/repos/getsentry/sentry/deployments","created_at":"2010-08-30T22:06:41Z","updated_at":"2018-07-16T21:32:40Z","pushed_at":"2018-07-16T21:37:02Z","git_url":"git://github.com/getsentry/sentry.git","ssh_url":"git@github.com:getsentry/sentry.git","clone_url":"https://github.com/getsentry/sentry.git","svn_url":"https://github.com/getsentry/sentry","homepage":"https://sentry.io","size":89961,"stargazers_count":17346,"watchers_count":17346,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2026,"mirror_url":null,"archived":false,"open_issues_count":839,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":2026,"open_issues":839,"watchers":17346,"default_branch":"master"}},"base":{"label":"getsentry:master","ref":"master","sha":"b3ac7ffa50bb7bef07d01a452fb9713ddc194b2c","user":{"login":"getsentry","id":1396951,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzOTY5NTE=","avatar_url":"https://avatars0.githubusercontent.com/u/1396951?v=4","gravatar_id":"","url":"https://api.github.com/users/getsentry","html_url":"https://github.com/getsentry","followers_url":"https://api.github.com/users/getsentry/followers","following_url":"https://api.github.com/users/getsentry/following{/other_user}","gists_url":"https://api.github.com/users/getsentry/gists{/gist_id}","starred_url":"https://api.github.com/users/getsentry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getsentry/subscriptions","organizations_url":"https://api.github.com/users/getsentry/orgs","repos_url":"https://api.github.com/users/getsentry/repos","events_url":"https://api.github.com/users/getsentry/events{/privacy}","received_events_url":"https://api.github.com/users/getsentry/received_events","type":"Organization","site_admin":false},"repo":{"id":873328,"node_id":"MDEwOlJlcG9zaXRvcnk4NzMzMjg=","name":"sentry","full_name":"getsentry/sentry","owner":{"login":"getsentry","id":1396951,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzOTY5NTE=","avatar_url":"https://avatars0.githubusercontent.com/u/1396951?v=4","gravatar_id":"","url":"https://api.github.com/users/getsentry","html_url":"https://github.com/getsentry","followers_url":"https://api.github.com/users/getsentry/followers","following_url":"https://api.github.com/users/getsentry/following{/other_user}","gists_url":"https://api.github.com/users/getsentry/gists{/gist_id}","starred_url":"https://api.github.com/users/getsentry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getsentry/subscriptions","organizations_url":"https://api.github.com/users/getsentry/orgs","repos_url":"https://api.github.com/users/getsentry/repos","events_url":"https://api.github.com/users/getsentry/events{/privacy}","received_events_url":"https://api.github.com/users/getsentry/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/getsentry/sentry","description":"Sentry is cross-platform application monitoring, with a focus on error reporting.","fork":false,"url":"https://api.github.com/repos/getsentry/sentry","forks_url":"https://api.github.com/repos/getsentry/sentry/forks","keys_url":"https://api.github.com/repos/getsentry/sentry/keys{/key_id}","collaborators_url":"https://api.github.com/repos/getsentry/sentry/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/getsentry/sentry/teams","hooks_url":"https://api.github.com/repos/getsentry/sentry/hooks","issue_events_url":"https://api.github.com/repos/getsentry/sentry/issues/events{/number}","events_url":"https://api.github.com/repos/getsentry/sentry/events","assignees_url":"https://api.github.com/repos/getsentry/sentry/assignees{/user}","branches_url":"https://api.github.com/repos/getsentry/sentry/branches{/branch}","tags_url":"https://api.github.com/repos/getsentry/sentry/tags","blobs_url":"https://api.github.com/repos/getsentry/sentry/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/getsentry/sentry/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/getsentry/sentry/git/refs{/sha}","trees_url":"https://api.github.com/repos/getsentry/sentry/git/trees{/sha}","statuses_url":"https://api.github.com/repos/getsentry/sentry/statuses/{sha}","languages_url":"https://api.github.com/repos/getsentry/sentry/languages","stargazers_url":"https://api.github.com/repos/getsentry/sentry/stargazers","contributors_url":"https://api.github.com/repos/getsentry/sentry/contributors","subscribers_url":"https://api.github.com/repos/getsentry/sentry/subscribers","subscription_url":"https://api.github.com/repos/getsentry/sentry/subscription","commits_url":"https://api.github.com/repos/getsentry/sentry/commits{/sha}","git_commits_url":"https://api.github.com/repos/getsentry/sentry/git/commits{/sha}","comments_url":"https://api.github.com/repos/getsentry/sentry/comments{/number}","issue_comment_url":"https://api.github.com/repos/getsentry/sentry/issues/comments{/number}","contents_url":"https://api.github.com/repos/getsentry/sentry/contents/{+path}","compare_url":"https://api.github.com/repos/getsentry/sentry/compare/{base}...{head}","merges_url":"https://api.github.com/repos/getsentry/sentry/merges","archive_url":"https://api.github.com/repos/getsentry/sentry/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/getsentry/sentry/downloads","issues_url":"https://api.github.com/repos/getsentry/sentry/issues{/number}","pulls_url":"https://api.github.com/repos/getsentry/sentry/pulls{/number}","milestones_url":"https://api.github.com/repos/getsentry/sentry/milestones{/number}","notifications_url":"https://api.github.com/repos/getsentry/sentry/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/getsentry/sentry/labels{/name}","releases_url":"https://api.github.com/repos/getsentry/sentry/releases{/id}","deployments_url":"https://api.github.com/repos/getsentry/sentry/deployments","created_at":"2010-08-30T22:06:41Z","updated_at":"2018-07-16T21:32:40Z","pushed_at":"2018-07-16T21:37:02Z","git_url":"git://github.com/getsentry/sentry.git","ssh_url":"git@github.com:getsentry/sentry.git","clone_url":"https://github.com/getsentry/sentry.git","svn_url":"https://github.com/getsentry/sentry","homepage":"https://sentry.io","size":89961,"stargazers_count":17346,"watchers_count":17346,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2026,"mirror_url":null,"archived":false,"open_issues_count":839,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":2026,"open_issues":839,"watchers":17346,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/getsentry/sentry/pulls/9037"},"html":{"href":"https://github.com/getsentry/sentry/pull/9037"},"issue":{"href":"https://api.github.com/repos/getsentry/sentry/issues/9037"},"comments":{"href":"https://api.github.com/repos/getsentry/sentry/issues/9037/comments"},"review_comments":{"href":"https://api.github.com/repos/getsentry/sentry/pulls/9037/comments"},"review_comment":{"href":"https://api.github.com/repos/getsentry/sentry/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/getsentry/sentry/pulls/9037/commits"},"statuses":{"href":"https://api.github.com/repos/getsentry/sentry/statuses/225ae16606d2357d0ab4ba0abc845d5e6836ed9a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"EvanPurkhiser"}}