{"action":"created","comment":{"url":"https://api.github.com/repos/getsentry/sentry/pulls/comments/167099142","pull_request_review_id":95269474,"id":167099142,"diff_hunk":"@@ -50,9 +50,18 @@ def get(self, request, project):\n         :pparam string project_slug: the slug of the project.\n         :auth: required\n         \"\"\"\n+        try:\n+            environment = self._get_environment_from_request(\n+                request,\n+                project.organization_id,\n+            )\n+        except Environment.DoesNotExist:\n+            return Response({'environment': 'Invalid environment'}, status=400)\n+\n         queryset = UserReport.objects.filter(\n             project=project,\n             group__isnull=False,\n+            environment=environment,","path":"src/sentry/api/endpoints/project_user_reports.py","position":24,"original_position":24,"commit_id":"9a74b8bf603be47e707f58e87a5b5ba9d8502d2b","original_commit_id":"9a74b8bf603be47e707f58e87a5b5ba9d8502d2b","user":{"login":"tkaemming","id":65315,"avatar_url":"https://avatars0.githubusercontent.com/u/65315?v=4","gravatar_id":"","url":"https://api.github.com/users/tkaemming","html_url":"https://github.com/tkaemming","followers_url":"https://api.github.com/users/tkaemming/followers","following_url":"https://api.github.com/users/tkaemming/following{/other_user}","gists_url":"https://api.github.com/users/tkaemming/gists{/gist_id}","starred_url":"https://api.github.com/users/tkaemming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkaemming/subscriptions","organizations_url":"https://api.github.com/users/tkaemming/orgs","repos_url":"https://api.github.com/users/tkaemming/repos","events_url":"https://api.github.com/users/tkaemming/events{/privacy}","received_events_url":"https://api.github.com/users/tkaemming/received_events","type":"User","site_admin":false},"body":"Yes, this is correct. The filter should only be applied if `environment is not None` (since `None` signifies \"no filter value\" in this context.)","created_at":"2018-02-08T23:23:49Z","updated_at":"2018-02-08T23:38:52Z","html_url":"https://github.com/getsentry/sentry/pull/7195#discussion_r167099142","pull_request_url":"https://api.github.com/repos/getsentry/sentry/pulls/7195","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/getsentry/sentry/pulls/comments/167099142"},"html":{"href":"https://github.com/getsentry/sentry/pull/7195#discussion_r167099142"},"pull_request":{"href":"https://api.github.com/repos/getsentry/sentry/pulls/7195"}},"in_reply_to_id":167092223},"pull_request":{"url":"https://api.github.com/repos/getsentry/sentry/pulls/7195","id":167856575,"html_url":"https://github.com/getsentry/sentry/pull/7195","diff_url":"https://github.com/getsentry/sentry/pull/7195.diff","patch_url":"https://github.com/getsentry/sentry/pull/7195.patch","issue_url":"https://api.github.com/repos/getsentry/sentry/issues/7195","number":7195,"state":"open","locked":false,"title":"feat(userreport): Add environment to UserReport in the event manager pipeline","user":{"login":"lauryndbrown","id":12959365,"avatar_url":"https://avatars0.githubusercontent.com/u/12959365?v=4","gravatar_id":"","url":"https://api.github.com/users/lauryndbrown","html_url":"https://github.com/lauryndbrown","followers_url":"https://api.github.com/users/lauryndbrown/followers","following_url":"https://api.github.com/users/lauryndbrown/following{/other_user}","gists_url":"https://api.github.com/users/lauryndbrown/gists{/gist_id}","starred_url":"https://api.github.com/users/lauryndbrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lauryndbrown/subscriptions","organizations_url":"https://api.github.com/users/lauryndbrown/orgs","repos_url":"https://api.github.com/users/lauryndbrown/repos","events_url":"https://api.github.com/users/lauryndbrown/events{/privacy}","received_events_url":"https://api.github.com/users/lauryndbrown/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-02-08T01:42:19Z","updated_at":"2018-02-08T23:38:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bb26933e93fd1289c88b08ab12c9c97d1dec05ab","assignee":{"login":"lauryndbrown","id":12959365,"avatar_url":"https://avatars0.githubusercontent.com/u/12959365?v=4","gravatar_id":"","url":"https://api.github.com/users/lauryndbrown","html_url":"https://github.com/lauryndbrown","followers_url":"https://api.github.com/users/lauryndbrown/followers","following_url":"https://api.github.com/users/lauryndbrown/following{/other_user}","gists_url":"https://api.github.com/users/lauryndbrown/gists{/gist_id}","starred_url":"https://api.github.com/users/lauryndbrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lauryndbrown/subscriptions","organizations_url":"https://api.github.com/users/lauryndbrown/orgs","repos_url":"https://api.github.com/users/lauryndbrown/repos","events_url":"https://api.github.com/users/lauryndbrown/events{/privacy}","received_events_url":"https://api.github.com/users/lauryndbrown/received_events","type":"User","site_admin":false},"assignees":[{"login":"lauryndbrown","id":12959365,"avatar_url":"https://avatars0.githubusercontent.com/u/12959365?v=4","gravatar_id":"","url":"https://api.github.com/users/lauryndbrown","html_url":"https://github.com/lauryndbrown","followers_url":"https://api.github.com/users/lauryndbrown/followers","following_url":"https://api.github.com/users/lauryndbrown/following{/other_user}","gists_url":"https://api.github.com/users/lauryndbrown/gists{/gist_id}","starred_url":"https://api.github.com/users/lauryndbrown/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lauryndbrown/subscriptions","organizations_url":"https://api.github.com/users/lauryndbrown/orgs","repos_url":"https://api.github.com/users/lauryndbrown/repos","events_url":"https://api.github.com/users/lauryndbrown/events{/privacy}","received_events_url":"https://api.github.com/users/lauryndbrown/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/getsentry/sentry/pulls/7195/commits","review_comments_url":"https://api.github.com/repos/getsentry/sentry/pulls/7195/comments","review_comment_url":"https://api.github.com/repos/getsentry/sentry/pulls/comments{/number}","comments_url":"https://api.github.com/repos/getsentry/sentry/issues/7195/comments","statuses_url":"https://api.github.com/repos/getsentry/sentry/statuses/9a74b8bf603be47e707f58e87a5b5ba9d8502d2b","head":{"label":"getsentry:user-reports-event-pipeline","ref":"user-reports-event-pipeline","sha":"9a74b8bf603be47e707f58e87a5b5ba9d8502d2b","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-02-08T23:29:25Z","pushed_at":"2018-02-08T22:57:57Z","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":78482,"stargazers_count":15596,"watchers_count":15596,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1868,"mirror_url":null,"archived":false,"open_issues_count":722,"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":1868,"open_issues":722,"watchers":15596,"default_branch":"master"}},"base":{"label":"getsentry:master","ref":"master","sha":"5b3975a5cd26a80c12a5ce480ac296e02a1e4163","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-02-08T23:29:25Z","pushed_at":"2018-02-08T22:57:57Z","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":78482,"stargazers_count":15596,"watchers_count":15596,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1868,"mirror_url":null,"archived":false,"open_issues_count":722,"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":1868,"open_issues":722,"watchers":15596,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/getsentry/sentry/pulls/7195"},"html":{"href":"https://github.com/getsentry/sentry/pull/7195"},"issue":{"href":"https://api.github.com/repos/getsentry/sentry/issues/7195"},"comments":{"href":"https://api.github.com/repos/getsentry/sentry/issues/7195/comments"},"review_comments":{"href":"https://api.github.com/repos/getsentry/sentry/pulls/7195/comments"},"review_comment":{"href":"https://api.github.com/repos/getsentry/sentry/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/getsentry/sentry/pulls/7195/commits"},"statuses":{"href":"https://api.github.com/repos/getsentry/sentry/statuses/9a74b8bf603be47e707f58e87a5b5ba9d8502d2b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"tkaemming"}}