Skip to content

Commit b9493c7

Browse files
fix knip
1 parent 93a064a commit b9493c7

File tree

3 files changed

+4
-20
lines changed

3 files changed

+4
-20
lines changed

static/app/types/prevent.tsx

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,5 @@
1-
// Add any new providers here e.g., 'github' | 'bitbucket' | 'gitlab'
2-
export type PreventAIProvider = 'github';
3-
41
export type Sensitivity = 'low' | 'medium' | 'high' | 'critical';
52

6-
export interface PreventAIRepo {
7-
fullName: string;
8-
id: string;
9-
name: string;
10-
}
11-
12-
export interface PreventAIOrg {
13-
githubOrganizationId: string;
14-
name: string;
15-
provider: PreventAIProvider;
16-
repos: PreventAIRepo[];
17-
}
18-
193
interface PreventAIFeatureConfig {
204
enabled: boolean;
215
triggers: PreventAIFeatureTriggers;

static/app/views/prevent/preventAI/hooks/usePreventAIInfiniteRepositories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import useOrganization from 'sentry/utils/useOrganization';
1111

1212
type QueryKey = [url: string, endpointOptions: QueryKeyEndpointOptions];
1313

14-
export type UseInfiniteRepositoriesOptions = {
14+
type UseInfiniteRepositoriesOptions = {
1515
integrationId: string;
1616
searchTerm?: string;
1717
};

static/app/views/prevent/preventAI/manageReposToolbar.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ function ManageReposToolbar({
6363
scrollListenerIdRef.current += 1;
6464
const currentId = scrollListenerIdRef.current;
6565

66-
const attachListener = (attempts = 0) => {
67-
if (scrollListenerIdRef.current !== currentId || attempts > 10) return;
66+
const attachListener = () => {
67+
if (scrollListenerIdRef.current !== currentId) return;
6868
const dropdownLists = document.querySelectorAll('ul[role="listbox"]');
6969
const lastList = dropdownLists[dropdownLists.length - 1];
7070
if (lastList instanceof HTMLElement) {
7171
scrollParentRef.current = lastList;
7272
lastList.addEventListener('scroll', handleScroll, {passive: true});
7373
} else {
74-
setTimeout(() => attachListener(attempts + 1), 20);
74+
setTimeout(attachListener, 20);
7575
}
7676
};
7777
attachListener();

0 commit comments

Comments
 (0)