Skip to content

Commit c50559b

Browse files
filiptronicekgeropl
andcommitted
Only show nudges when !onlyConfigurations
Co-authored-by: Gero Posmyk-Leinemann <[email protected]>
1 parent 0147dd7 commit c50559b

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

components/dashboard/src/components/RepositoryFinder.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,9 @@ export default function RepositoryFinder({
320320
}
321321

322322
if (
323+
!onlyConfigurations &&
323324
searchString.length > 0 &&
324-
authProviders.data?.some((p) => p.type === AuthProviderType.BITBUCKET_SERVER) &&
325-
!onlyConfigurations
325+
authProviders.data?.some((p) => p.type === AuthProviderType.BITBUCKET_SERVER)
326326
) {
327327
// add an element that tells the user that the Bitbucket Server does only support prefix search
328328
result.push({
@@ -338,10 +338,10 @@ export default function RepositoryFinder({
338338
}
339339

340340
if (
341+
!onlyConfigurations &&
341342
searchString.length > 0 &&
342343
searchString.length < 3 &&
343-
authProviders.data?.some((p) => p.type === AuthProviderType.GITLAB) &&
344-
!onlyConfigurations
344+
authProviders.data?.some((p) => p.type === AuthProviderType.GITLAB)
345345
) {
346346
// add an element that tells the user that GitLab only does exact searches for short queries
347347
result.push({
@@ -360,6 +360,7 @@ export default function RepositoryFinder({
360360
["Bitbucket", "Bitbucket Server", "GitLab"].includes(p),
361361
);
362362
if (
363+
!onlyConfigurations &&
363364
searchString.length > 1 &&
364365
setupProvidersWithoutPathSearchSupport.length > 0 &&
365366
searchString.includes("/")
@@ -381,7 +382,11 @@ export default function RepositoryFinder({
381382
});
382383
}
383384

384-
if (searchString.length > 0 && authProviders.data?.some((p) => p.type === AuthProviderType.AZURE_DEVOPS)) {
385+
if (
386+
!onlyConfigurations &&
387+
searchString.length > 0 &&
388+
authProviders.data?.some((p) => p.type === AuthProviderType.AZURE_DEVOPS)
389+
) {
385390
// CLC-780
386391
result.push({
387392
id: "azure-devops",

0 commit comments

Comments
 (0)