diff --git a/plugins/git4idea/src/git4idea/remote/hosting/http/HostedGitHttpAuthDataProvider.kt b/plugins/git4idea/src/git4idea/remote/hosting/http/SilentHostedGitHttpAuthDataProvider.kt
similarity index 97%
rename from plugins/git4idea/src/git4idea/remote/hosting/http/HostedGitHttpAuthDataProvider.kt
rename to plugins/git4idea/src/git4idea/remote/hosting/http/SilentHostedGitHttpAuthDataProvider.kt
index 50f8b1ab0d70..b1c48483e8ab 100644
--- a/plugins/git4idea/src/git4idea/remote/hosting/http/HostedGitHttpAuthDataProvider.kt
+++ b/plugins/git4idea/src/git4idea/remote/hosting/http/SilentHostedGitHttpAuthDataProvider.kt
@@ -16,6 +16,8 @@ import org.jetbrains.annotations.ApiStatus
* Base class that provides a business logic part of [GitHttpAuthDataProvider] interface,
* that can be extended by git hosting providers such as Space, GitHub, GitLab, BitBucket, etc.
*
+ * Will do no user interaction
+ *
* This logic can be described as: if user is logged in plugin (so their account is stored in [accountManager])
* then their token will be passed as password for http remote operations.
*
@@ -28,7 +30,7 @@ import org.jetbrains.annotations.ApiStatus
* Clients' auth data providers should be registered in plugin.xml with "Git4Idea.GitHttpAuthDataProvider" extension.
*/
@ApiStatus.Experimental
-abstract class HostedGitHttpAuthDataProvider : GitHttpAuthDataProvider {
+abstract class SilentHostedGitHttpAuthDataProvider : GitHttpAuthDataProvider {
abstract val providerId: String
/**
diff --git a/plugins/github/resources/META-INF/plugin.xml b/plugins/github/resources/META-INF/plugin.xml
index c6a913d5ee4c..d3a629cfabfc 100644
--- a/plugins/github/resources/META-INF/plugin.xml
+++ b/plugins/github/resources/META-INF/plugin.xml
@@ -78,7 +78,7 @@
-
+
diff --git a/plugins/github/src/org/jetbrains/plugins/github/extensions/GHRepositoryHostingService.kt b/plugins/github/src/org/jetbrains/plugins/github/extensions/GHRepositoryHostingService.kt
index 4678421fc409..028b60b6a0e3 100644
--- a/plugins/github/src/org/jetbrains/plugins/github/extensions/GHRepositoryHostingService.kt
+++ b/plugins/github/src/org/jetbrains/plugins/github/extensions/GHRepositoryHostingService.kt
@@ -14,7 +14,7 @@ internal class GHRepositoryHostingService : GitRepositoryHostingService() {
@RequiresBackgroundThread
override fun getInteractiveAuthDataProvider(project: Project, url: String)
: InteractiveGitHttpAuthDataProvider? = runBlocking {
- GHHttpAuthDataProvider.getAccountsWithTokens(project, url).takeIf { it.isNotEmpty() }?.let {
+ GHSilentHttpAuthDataProvider.getAccountsWithTokens(project, url).takeIf { it.isNotEmpty() }?.let {
GHSelectAccountHttpAuthDataProvider(project, it)
}
}
@@ -22,9 +22,9 @@ internal class GHRepositoryHostingService : GitRepositoryHostingService() {
@RequiresBackgroundThread
override fun getInteractiveAuthDataProvider(project: Project, url: String, login: String)
: InteractiveGitHttpAuthDataProvider? = runBlocking {
- GHHttpAuthDataProvider.getAccountsWithTokens(project, url).mapNotNull { (acc, token) ->
+ GHSilentHttpAuthDataProvider.getAccountsWithTokens(project, url).mapNotNull { (acc, token) ->
if (token == null) return@mapNotNull null
- val details = GHHttpAuthDataProvider.getAccountDetails(acc, token) ?: return@mapNotNull null
+ val details = GHSilentHttpAuthDataProvider.getAccountDetails(acc, token) ?: return@mapNotNull null
if (details.login != login) return@mapNotNull null
acc to token
}.takeIf { it.isNotEmpty() }?.let {
diff --git a/plugins/github/src/org/jetbrains/plugins/github/extensions/GHHttpAuthDataProvider.kt b/plugins/github/src/org/jetbrains/plugins/github/extensions/GHSilentHttpAuthDataProvider.kt
similarity index 92%
rename from plugins/github/src/org/jetbrains/plugins/github/extensions/GHHttpAuthDataProvider.kt
rename to plugins/github/src/org/jetbrains/plugins/github/extensions/GHSilentHttpAuthDataProvider.kt
index 3ddf3c39c768..24314c593033 100644
--- a/plugins/github/src/org/jetbrains/plugins/github/extensions/GHHttpAuthDataProvider.kt
+++ b/plugins/github/src/org/jetbrains/plugins/github/extensions/GHSilentHttpAuthDataProvider.kt
@@ -10,7 +10,7 @@ import com.intellij.openapi.progress.DumbProgressIndicator
import com.intellij.openapi.progress.ProcessCanceledException
import com.intellij.openapi.project.Project
import git4idea.remote.hosting.http.HostedGitAuthenticationFailureManager
-import git4idea.remote.hosting.http.HostedGitHttpAuthDataProvider
+import git4idea.remote.hosting.http.SilentHostedGitHttpAuthDataProvider
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import org.jetbrains.plugins.github.api.GithubApiRequestExecutor
@@ -20,9 +20,9 @@ import org.jetbrains.plugins.github.authentication.accounts.GithubAccount
import org.jetbrains.plugins.github.authentication.accounts.GithubAccountInformationProvider
import org.jetbrains.plugins.github.authentication.accounts.GithubProjectDefaultAccountHolder
-private val LOG = logger()
+private val LOG = logger()
-internal class GHHttpAuthDataProvider : HostedGitHttpAuthDataProvider() {
+internal class GHSilentHttpAuthDataProvider : SilentHostedGitHttpAuthDataProvider() {
override val providerId: String = "GitHub Plugin"
override val accountManager: AccountManager
diff --git a/plugins/gitlab/resources/META-INF/plugin.xml b/plugins/gitlab/resources/META-INF/plugin.xml
index 36565e9e98db..95f4ff480a40 100644
--- a/plugins/gitlab/resources/META-INF/plugin.xml
+++ b/plugins/gitlab/resources/META-INF/plugin.xml
@@ -42,7 +42,7 @@
-
+
diff --git a/plugins/gitlab/src/org/jetbrains/plugins/gitlab/git/http/GitLabGitHttpAuthDataProvider.kt b/plugins/gitlab/src/org/jetbrains/plugins/gitlab/git/http/GitLabSilentHttpAuthDataProvider.kt
similarity index 88%
rename from plugins/gitlab/src/org/jetbrains/plugins/gitlab/git/http/GitLabGitHttpAuthDataProvider.kt
rename to plugins/gitlab/src/org/jetbrains/plugins/gitlab/git/http/GitLabSilentHttpAuthDataProvider.kt
index 943acb8450ed..9b373094be04 100644
--- a/plugins/gitlab/src/org/jetbrains/plugins/gitlab/git/http/GitLabGitHttpAuthDataProvider.kt
+++ b/plugins/gitlab/src/org/jetbrains/plugins/gitlab/git/http/GitLabSilentHttpAuthDataProvider.kt
@@ -8,16 +8,16 @@ import com.intellij.openapi.diagnostic.logger
import com.intellij.openapi.progress.ProcessCanceledException
import com.intellij.openapi.project.Project
import git4idea.remote.hosting.http.HostedGitAuthenticationFailureManager
-import git4idea.remote.hosting.http.HostedGitHttpAuthDataProvider
+import git4idea.remote.hosting.http.SilentHostedGitHttpAuthDataProvider
import org.jetbrains.plugins.gitlab.api.GitLabApiManager
import org.jetbrains.plugins.gitlab.api.request.getCurrentUser
import org.jetbrains.plugins.gitlab.authentication.accounts.GitLabAccount
import org.jetbrains.plugins.gitlab.authentication.accounts.GitLabAccountManager
import org.jetbrains.plugins.gitlab.authentication.accounts.GitLabProjectDefaultAccountHolder
-private val LOG = logger()
+private val LOG = logger()
-internal class GitLabGitHttpAuthDataProvider : HostedGitHttpAuthDataProvider() {
+internal class GitLabSilentHttpAuthDataProvider : SilentHostedGitHttpAuthDataProvider() {
override val providerId: String = "GitLab Plugin"
override val accountManager: AccountManager