diff --git a/static/app/components/group/externalIssuesList/linkedPullRequests.tsx b/static/app/components/group/externalIssuesList/linkedPullRequests.tsx index d9314585bd9c..487882bdba87 100644 --- a/static/app/components/group/externalIssuesList/linkedPullRequests.tsx +++ b/static/app/components/group/externalIssuesList/linkedPullRequests.tsx @@ -62,6 +62,7 @@ export function getLinkedPullRequestActivityIds(group: Group) { interface LinkedPullRequestsProps { group: Group; + showChecksAndReview?: boolean; showEmptyState?: boolean; } @@ -231,7 +232,13 @@ function SeerAttributionAvatar() { ); } -export function useLinkedPullRequests({group}: {group: Group}) { +export function useLinkedPullRequests({ + group, + includeChecksAndReview = true, +}: { + group: Group; + includeChecksAndReview?: boolean; +}) { const organization = useOrganization(); return useQuery( @@ -239,15 +246,22 @@ export function useLinkedPullRequests({group}: {group: Group}) { '/organizations/$organizationIdOrSlug/issues/$issueId/pull-requests/', { path: {organizationIdOrSlug: organization.slug, issueId: group.id}, - query: {expand: 'checksAndReview'}, + query: includeChecksAndReview ? {expand: 'checksAndReview'} : undefined, staleTime: 30_000, } ) ); } -export function LinkedPullRequests({group, showEmptyState}: LinkedPullRequestsProps) { - const {data, isError, isPending} = useLinkedPullRequests({group}); +export function LinkedPullRequests({ + group, + showChecksAndReview = true, + showEmptyState, +}: LinkedPullRequestsProps) { + const {data, isError, isPending} = useLinkedPullRequests({ + group, + includeChecksAndReview: showChecksAndReview, + }); const activityPullRequestIds = getLinkedPullRequestActivityIds(group); if (isError) { diff --git a/static/app/views/issueDetails/sidebar/externalIssueSidebarList.tsx b/static/app/views/issueDetails/sidebar/externalIssueSidebarList.tsx index df0f425e4120..3bf001e08df6 100644 --- a/static/app/views/issueDetails/sidebar/externalIssueSidebarList.tsx +++ b/static/app/views/issueDetails/sidebar/externalIssueSidebarList.tsx @@ -24,7 +24,7 @@ interface Props { export function ExternalIssueSidebarList({event, group}: Props) { const externalIssueData = useGroupExternalIssues({group, event}); const {data: linkedPullRequestsData, isPending: isLinkedPullRequestsLoading} = - useLinkedPullRequests({group}); + useLinkedPullRequests({group, includeChecksAndReview: false}); const hasLinkedPullRequestActivity = getLinkedPullRequestActivityIds(group).size > 0; const showEmptyIssueTrackerAction = !externalIssueData.isLoading && @@ -60,6 +60,7 @@ export function ExternalIssueSidebarList({event, group}: Props) {