Skip to content

Commit

Permalink
fix(integrations): Remove internal-only feature flag from comments
Browse files Browse the repository at this point in the history
  • Loading branch information
macqueen committed Sep 21, 2018
1 parent 22b6ac3 commit be3ea4a
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions src/sentry/api/endpoints/group_notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from rest_framework import status
from rest_framework.response import Response

from sentry import features
from sentry.api.base import DocSection
from sentry.api.bases.group import GroupEndpoint
from sentry.api.serializers import serialize
Expand Down Expand Up @@ -104,18 +103,17 @@ def post(self, request, group):
activity.send_notification()

# sync Sentry comments to external issues
if features.has('organizations:internal-catchall', group.organization, actor=request.user):
external_issue_ids = GroupLink.objects.filter(
project_id=group.project_id,
group_id=group.id,
linked_type=GroupLink.LinkedType.issue,
).values_list('linked_id', flat=True)

for external_issue_id in external_issue_ids:
post_comment.apply_async(
kwargs={
'external_issue_id': external_issue_id,
'data': data,
}
)
external_issue_ids = GroupLink.objects.filter(
project_id=group.project_id,
group_id=group.id,
linked_type=GroupLink.LinkedType.issue,
).values_list('linked_id', flat=True)

for external_issue_id in external_issue_ids:
post_comment.apply_async(
kwargs={
'external_issue_id': external_issue_id,
'data': data,
}
)
return Response(serialize(activity, request.user), status=201)

0 comments on commit be3ea4a

Please sign in to comment.