Skip to content

Conversation

@mgaeta
Copy link
Contributor

@mgaeta mgaeta commented Oct 5, 2021

Refactor build_actions() to use helpers and types.

@mgaeta mgaeta requested a review from a team as a code owner October 5, 2021 01:12
@mgaeta mgaeta requested a review from a team October 5, 2021 01:12
@mgaeta mgaeta force-pushed the fix/api-2163-slack-actions branch from 18eaa1a to 999af82 Compare October 5, 2021 02:57
@mgaeta mgaeta force-pushed the fix/api-2163-slack-actions branch from 07196e4 to 9670f86 Compare October 6, 2021 02:38
@mgaeta mgaeta force-pushed the fix/api-2163-slack-actions branch from 9670f86 to aea306e Compare October 6, 2021 18:28
@mgaeta mgaeta changed the base branch from master to fix/api-2163-slack-actions-2 October 6, 2021 18:28
@mgaeta mgaeta changed the title fix(integrations): Slack Assignment Members ref(integrations): Slack Assignment Members Oct 6, 2021
@mgaeta mgaeta force-pushed the fix/api-2163-slack-actions-2 branch 2 times, most recently from 89b6303 to fcea1a6 Compare October 7, 2021 01:02
Base automatically changed from fix/api-2163-slack-actions-2 to master October 7, 2021 16:45
@mgaeta mgaeta force-pushed the fix/api-2163-slack-actions branch from b061a88 to 83295c3 Compare October 7, 2021 16:56
@mgaeta mgaeta requested review from a team and removed request for a team November 1, 2021 20:45
@mgaeta
Copy link
Contributor Author

mgaeta commented Nov 1, 2021

@leeandher I just rebased this branch can you take another look?

@mgaeta mgaeta requested a review from leeandher November 1, 2021 21:04
Comment on lines +299 to +311
external_issue_subquery = ExternalIssue.objects.get_for_integration(
integration, external_issue_key
).values_list("id", flat=True)

group_link_subquery = GroupLink.objects.filter(
linked_id__in=external_issue_subquery
).values_list("group_id", flat=True)

return self.filter(
id__in=GroupLink.objects.filter(
linked_id__in=ExternalIssue.objects.filter(
key=external_issue_key,
integration_id=integration.id,
organization_id__in=integration.organizations.values_list("id", flat=True),
).values_list("id", flat=True)
).values_list("group_id", flat=True),
project__organization_id__in=integration.organizations.values_list("id", flat=True),
)
id__in=group_link_subquery,
project__organization__in=organizations,
project__organization__organizationintegration__integration=integration,
).select_related("project")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

way more legible ✨

@mgaeta mgaeta merged commit 6fd99b7 into master Nov 1, 2021
@mgaeta mgaeta deleted the fix/api-2163-slack-actions branch November 1, 2021 23:16
@github-actions github-actions bot locked and limited conversation to collaborators Nov 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants