Skip to content

Commit 62c1094

Browse files
committed
ref to use useSeerSupportedProviderIds
1 parent 49167ca commit 62c1094

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

static/app/views/settings/seer/overview/codeReviewOverviewSection.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {Text} from '@sentry/scraps/text';
1212
import {addErrorMessage, addSuccessMessage} from 'sentry/actionCreators/indicator';
1313
import {updateOrganization} from 'sentry/actionCreators/organizations';
1414
import {organizationRepositoriesInfiniteOptions} from 'sentry/components/events/autofix/preferences/hooks/useOrganizationRepositories';
15-
import {isSupportedAutofixProvider} from 'sentry/components/events/autofix/utils';
15+
import {useSeerSupportedProviderIds} from 'sentry/components/events/autofix/utils';
1616
import {useBulkUpdateRepositorySettings} from 'sentry/components/repositories/useBulkUpdateRepositorySettings';
1717
import {getRepositoryWithSettingsQueryKey} from 'sentry/components/repositories/useRepositoryWithSettings';
1818
import {IconRefresh, IconSettings} from 'sentry/icons';
@@ -26,6 +26,7 @@ import {useOrganization} from 'sentry/utils/useOrganization';
2626

2727
export function useCodeReviewOverviewSection() {
2828
const organization = useOrganization();
29+
const seerSupportedProviderIds = useSeerSupportedProviderIds();
2930

3031
const queryOptions = organizationRepositoriesInfiniteOptions({
3132
organization,
@@ -38,7 +39,9 @@ export function useCodeReviewOverviewSection() {
3839
pages.flatMap(page => page.json),
3940
'externalId'
4041
).filter(repository => repository.externalId);
41-
const seerRepos = repos.filter(r => isSupportedAutofixProvider(r.provider));
42+
const seerRepos = repos.filter(r =>
43+
seerSupportedProviderIds.includes(r.provider.id)
44+
);
4245
const reposWithCodeReview = seerRepos.filter(r => r.settings?.enabledCodeReview);
4346
return {
4447
queryKey: queryOptions.queryKey,

0 commit comments

Comments
 (0)