Skip to content

Commit 3dcba47

Browse files
committed
Remove duplicate Bitbucket value check
1 parent 89221af commit 3dcba47

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

components/dashboard/src/components/RepositoryFinder.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ export default function RepositoryFinder({
360360
}
361361

362362
const setupProvidersWithoutPathSearchSupport = usedProviders.filter((p) =>
363-
["Bitbucket", "Bitbucket Server", "GitLab"].includes(p),
363+
["Bitbucket", "GitLab"].includes(p),
364364
);
365365
if (
366366
!onlyConfigurations &&
@@ -385,11 +385,7 @@ export default function RepositoryFinder({
385385
});
386386
}
387387

388-
if (
389-
!onlyConfigurations &&
390-
searchString.length > 0 &&
391-
authProviders.data?.some((p) => p.type === AuthProviderType.AZURE_DEVOPS)
392-
) {
388+
if (!onlyConfigurations && searchString.length > 0 && usedProviders.includes("Azure DevOps")) {
393389
// CLC-780
394390
result.push({
395391
id: "azure-devops",

components/dashboard/src/utils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ const unifyProviderType = (type: AuthProviderType): UnifiedAuthProvider | undefi
252252
}
253253
};
254254

255-
const isAuthProviderType = (type?: UnifiedAuthProvider): type is UnifiedAuthProvider => !!type;
256255
export const getDeduplicatedScmProviders = (
257256
user: User,
258257
descriptions: AuthProviderDescription[],
@@ -265,7 +264,7 @@ export const getDeduplicatedScmProviders = (
265264

266265
const unifiedProviders = userProviders
267266
.map((type) => unifyProviderType(type))
268-
.filter(isAuthProviderType)
267+
.filter((t) => !!t)
269268
.sort();
270269

271270
return uniq(unifiedProviders);

0 commit comments

Comments
 (0)