@@ -47,9 +47,9 @@ export default function RepositoryFinder({
47
47
hasMore,
48
48
} = useUnifiedRepositorySearch ( {
49
49
searchString,
50
- excludeConfigurations : excludeConfigurations ,
51
- onlyConfigurations : onlyConfigurations ,
52
- showExamples : showExamples ,
50
+ excludeConfigurations,
51
+ onlyConfigurations,
52
+ showExamples,
53
53
} ) ;
54
54
55
55
const authProviders = useAuthProviderDescriptions ( ) ;
@@ -193,7 +193,7 @@ export default function RepositoryFinder({
193
193
194
194
const getElements = useCallback (
195
195
( searchString : string ) : ComboboxElement [ ] => {
196
- if ( isShowingExamples && searchString . length === 0 ) {
196
+ if ( isShowingExamples && searchString . length === 0 && ! onlyConfigurations ) {
197
197
return PREDEFINED_REPOS . map ( ( repo ) => ( {
198
198
id : repo . url ,
199
199
element : < PredefinedRepositoryOption repo = { repo } /> ,
@@ -207,19 +207,21 @@ export default function RepositoryFinder({
207
207
isSelectable : true ,
208
208
} ) ) ;
209
209
210
- // Add predefined repos to end of the list.
211
- PREDEFINED_REPOS . forEach ( ( repo ) => {
212
- if (
213
- repo . url . toLowerCase ( ) . includes ( searchString . toLowerCase ( ) ) ||
214
- repo . repoName . toLowerCase ( ) . includes ( searchString . toLowerCase ( ) )
215
- ) {
216
- result . push ( {
217
- id : repo . url ,
218
- element : < PredefinedRepositoryOption repo = { repo } /> ,
219
- isSelectable : true ,
220
- } ) ;
221
- }
222
- } ) ;
210
+ if ( ! onlyConfigurations ) {
211
+ // Add predefined repos to end of the list.
212
+ PREDEFINED_REPOS . forEach ( ( repo ) => {
213
+ if (
214
+ repo . url . toLowerCase ( ) . includes ( searchString . toLowerCase ( ) ) ||
215
+ repo . repoName . toLowerCase ( ) . includes ( searchString . toLowerCase ( ) )
216
+ ) {
217
+ result . push ( {
218
+ id : repo . url ,
219
+ element : < PredefinedRepositoryOption repo = { repo } /> ,
220
+ isSelectable : true ,
221
+ } ) ;
222
+ }
223
+ } ) ;
224
+ }
223
225
224
226
if ( hasMore ) {
225
227
result . push ( {
0 commit comments