{"action":"created","comment":{"url":"https://api.github.com/repos/getsentry/sentry/pulls/comments/175865233","pull_request_review_id":105467357,"id":175865233,"diff_hunk":"@@ -0,0 +1,34 @@\n+from __future__ import absolute_import\n+\n+from sentry.api.bases import OrganizationMemberEndpoint\n+from sentry.api.paginator import OffsetPaginator\n+from sentry.api.serializers import serialize, CommitWithReleaseSerializer\n+from sentry.db.models.query import in_iexact\n+from sentry.models import Commit, CommitAuthor, UserEmail\n+\n+\n+class OrganizationMemberCommitsEndpoint(OrganizationMemberEndpoint):\n+    def get(self, request, organization, member):\n+        email_list = list(UserEmail.objects.filter(\n+            user=member.user_id,\n+            is_verified=True,\n+        ).values_list('email', flat=True))\n+        if email_list:\n+            queryset = Commit.objects.filter(\n+                organization_id=organization.id,\n+                author__in=CommitAuthor.objects.filter(\n+                    in_iexact('email', email_list),","path":"src/sentry/api/endpoints/organization_member_commits.py","position":20,"original_position":20,"commit_id":"cdb5c49f4f838eeec5b645adee08443f82b48dce","original_commit_id":"cdb5c49f4f838eeec5b645adee08443f82b48dce","user":{"login":"mattrobenolt","id":375744,"avatar_url":"https://avatars1.githubusercontent.com/u/375744?v=4","gravatar_id":"","url":"https://api.github.com/users/mattrobenolt","html_url":"https://github.com/mattrobenolt","followers_url":"https://api.github.com/users/mattrobenolt/followers","following_url":"https://api.github.com/users/mattrobenolt/following{/other_user}","gists_url":"https://api.github.com/users/mattrobenolt/gists{/gist_id}","starred_url":"https://api.github.com/users/mattrobenolt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattrobenolt/subscriptions","organizations_url":"https://api.github.com/users/mattrobenolt/orgs","repos_url":"https://api.github.com/users/mattrobenolt/repos","events_url":"https://api.github.com/users/mattrobenolt/events{/privacy}","received_events_url":"https://api.github.com/users/mattrobenolt/received_events","type":"User","site_admin":false},"body":"Not a blocker or anything, but we should probably either put a functional index here, or make it citext.\r\n\r\nJust noting because this will just be filtering over all authors within an org.\r\n\r\nThe best index we have here currently is `\"sentry_commitauthor_organization_id_5656e6a6baa5f6c_uniq\" UNIQUE CONSTRAINT, btree (organization_id, email)` and it'll only scan the organization_id half. But the data set here shouldn't be too large to cause a problem.","created_at":"2018-03-20T17:53:19Z","updated_at":"2018-03-20T17:58:17Z","html_url":"https://github.com/getsentry/sentry/pull/7712#discussion_r175865233","pull_request_url":"https://api.github.com/repos/getsentry/sentry/pulls/7712","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/getsentry/sentry/pulls/comments/175865233"},"html":{"href":"https://github.com/getsentry/sentry/pull/7712#discussion_r175865233"},"pull_request":{"href":"https://api.github.com/repos/getsentry/sentry/pulls/7712"}}},"pull_request":{"url":"https://api.github.com/repos/getsentry/sentry/pulls/7712","id":176272520,"html_url":"https://github.com/getsentry/sentry/pull/7712","diff_url":"https://github.com/getsentry/sentry/pull/7712.diff","patch_url":"https://github.com/getsentry/sentry/pull/7712.patch","issue_url":"https://api.github.com/repos/getsentry/sentry/issues/7712","number":7712,"state":"open","locked":false,"title":"feat(owners): Add My Commits prototype","user":{"login":"dcramer","id":23610,"avatar_url":"https://avatars0.githubusercontent.com/u/23610?v=4","gravatar_id":"","url":"https://api.github.com/users/dcramer","html_url":"https://github.com/dcramer","followers_url":"https://api.github.com/users/dcramer/followers","following_url":"https://api.github.com/users/dcramer/following{/other_user}","gists_url":"https://api.github.com/users/dcramer/gists{/gist_id}","starred_url":"https://api.github.com/users/dcramer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcramer/subscriptions","organizations_url":"https://api.github.com/users/dcramer/orgs","repos_url":"https://api.github.com/users/dcramer/repos","events_url":"https://api.github.com/users/dcramer/events{/privacy}","received_events_url":"https://api.github.com/users/dcramer/received_events","type":"User","site_admin":false},"body":"This adds a new prototype feature which shows commits associated with an organization member. It buckets them between unreleased and released.","created_at":"2018-03-20T17:49:34Z","updated_at":"2018-03-20T17:58:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b635a61c78ede3276b2e8b4db8a95b356a7b1ab8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/getsentry/sentry/pulls/7712/commits","review_comments_url":"https://api.github.com/repos/getsentry/sentry/pulls/7712/comments","review_comment_url":"https://api.github.com/repos/getsentry/sentry/pulls/comments{/number}","comments_url":"https://api.github.com/repos/getsentry/sentry/issues/7712/comments","statuses_url":"https://api.github.com/repos/getsentry/sentry/statuses/cdb5c49f4f838eeec5b645adee08443f82b48dce","head":{"label":"getsentry:feat/my-commits","ref":"feat/my-commits","sha":"cdb5c49f4f838eeec5b645adee08443f82b48dce","user":{"login":"getsentry","id":1396951,"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,"name":"sentry","full_name":"getsentry/sentry","owner":{"login":"getsentry","id":1396951,"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 a cross-platform crash reporting and aggregation platform.","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-03-20T17:38:01Z","pushed_at":"2018-03-20T17:49:35Z","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":80860,"stargazers_count":16048,"watchers_count":16048,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1899,"mirror_url":null,"archived":false,"open_issues_count":756,"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"},"forks":1899,"open_issues":756,"watchers":16048,"default_branch":"master"}},"base":{"label":"getsentry:master","ref":"master","sha":"531faed25e55d8bde5712542b7b3671eba2a8959","user":{"login":"getsentry","id":1396951,"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,"name":"sentry","full_name":"getsentry/sentry","owner":{"login":"getsentry","id":1396951,"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 a cross-platform crash reporting and aggregation platform.","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-03-20T17:38:01Z","pushed_at":"2018-03-20T17:49:35Z","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":80860,"stargazers_count":16048,"watchers_count":16048,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1899,"mirror_url":null,"archived":false,"open_issues_count":756,"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"},"forks":1899,"open_issues":756,"watchers":16048,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/getsentry/sentry/pulls/7712"},"html":{"href":"https://github.com/getsentry/sentry/pull/7712"},"issue":{"href":"https://api.github.com/repos/getsentry/sentry/issues/7712"},"comments":{"href":"https://api.github.com/repos/getsentry/sentry/issues/7712/comments"},"review_comments":{"href":"https://api.github.com/repos/getsentry/sentry/pulls/7712/comments"},"review_comment":{"href":"https://api.github.com/repos/getsentry/sentry/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/getsentry/sentry/pulls/7712/commits"},"statuses":{"href":"https://api.github.com/repos/getsentry/sentry/statuses/cdb5c49f4f838eeec5b645adee08443f82b48dce"}},"author_association":"OWNER"}}
{"actor":{"display_login":"mattrobenolt"}}