mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-21 22:11:40 +07:00
[gig] Search cloneable repositories for selected account
GitOrigin-RevId: d76149db62fe9d9e6f31ff44cd01a804c250d8b3
This commit is contained in:
committed by
intellij-monorepo-bot
parent
1a80f44269
commit
12cd226d47
@@ -397,7 +397,8 @@ private suspend fun <D> Wrapper.bindContentImpl(
|
||||
}
|
||||
}
|
||||
|
||||
private fun JPanel.runPreservingFocus(runnable: () -> Unit) {
|
||||
@ApiStatus.Internal
|
||||
fun JPanel.runPreservingFocus(runnable: () -> Unit) {
|
||||
val focused = CollaborationToolsUIUtil.isFocusParent(this)
|
||||
runnable()
|
||||
if (focused) {
|
||||
|
||||
@@ -2,4 +2,6 @@ fragment projectForClone on Project {
|
||||
nameWithNamespace
|
||||
fullPath
|
||||
httpUrlToRepo
|
||||
sshUrlToRepo
|
||||
description
|
||||
}
|
||||
@@ -18,6 +18,8 @@ data class GitLabProjectForCloneDTO(
|
||||
val nameWithNamespace: @Nls String,
|
||||
val fullPath: @NlsSafe String,
|
||||
val httpUrlToRepo: @NlsSafe String?,
|
||||
val sshUrlToRepo: @NlsSafe String?,
|
||||
val description: @NlsSafe String?
|
||||
)
|
||||
|
||||
class GitLabProjectsForCloneDTO(
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.intellij.collaboration.api.page.ApiPageUtil
|
||||
import com.intellij.collaboration.util.resolveRelative
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.map
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
import org.jetbrains.plugins.gitlab.api.*
|
||||
import org.jetbrains.plugins.gitlab.api.dto.*
|
||||
import org.jetbrains.plugins.gitlab.mergerequest.api.dto.GitLabMergeRequestDTO
|
||||
@@ -64,8 +65,9 @@ suspend fun GitLabApi.Rest.getProjectUsers(uri: URI): HttpResponse<out List<GitL
|
||||
}
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
@SinceGitLab("13.0")
|
||||
internal fun GitLabApi.GraphQL.getCloneableProjects(): Flow<List<GitLabProjectForCloneDTO>> =
|
||||
fun GitLabApi.GraphQL.getCloneableProjects(): Flow<List<GitLabProjectForCloneDTO>> =
|
||||
ApiPageUtil.createGQLPagesFlow { page ->
|
||||
val parameters = page.asParameters()
|
||||
val request = gitLabQuery(GitLabGQLQuery.GET_MEMBER_PROJECTS_FOR_CLONE, parameters)
|
||||
|
||||
Reference in New Issue
Block a user