diff --git a/src/main/kotlin/org/jetbrains/research/ictl/riskypatterns/service/github/GitHubSearchService.kt b/src/main/kotlin/org/jetbrains/research/ictl/riskypatterns/service/github/GitHubSearchService.kt index a78a329..97d44cc 100644 --- a/src/main/kotlin/org/jetbrains/research/ictl/riskypatterns/service/github/GitHubSearchService.kt +++ b/src/main/kotlin/org/jetbrains/research/ictl/riskypatterns/service/github/GitHubSearchService.kt @@ -7,8 +7,12 @@ class GitHubSearchService( private val gitHubClient: GitHubClient, ) { suspend fun searchRepositories(q: String) = - gitHubClient.searchRepositories(q).groupBy { it.owner } - .map { RepositoriesByOwner(it.key, it.value) } + if (q.isNotBlank()) { + gitHubClient.searchRepositories("$q fork:true").groupBy { it.owner } + .map { RepositoriesByOwner(it.key, it.value) } + } else { + emptyList() + } } data class RepositoriesByOwner(