feature: add gitlab remote support
This commit is contained in:
@@ -11,6 +11,7 @@ from git_flow.remote.base import RemoteAPI
|
||||
from git_flow.remote.bitbucket import BitbucketRemoteAPI
|
||||
from git_flow.remote.github import GithubRemoteAPI
|
||||
from git_flow.remote.gitea import GiteaRemoteAPI
|
||||
from git_flow.remote.gitlab import GitlabRemoteAPI
|
||||
from git_flow.io import *
|
||||
from os.path import isfile
|
||||
|
||||
@@ -123,6 +124,9 @@ def get_remote_api(token: str) -> RemoteAPI:
|
||||
if remote_type == "gitea":
|
||||
remote_schema = "https://" if schema == "ssh://" else schema
|
||||
return GiteaRemoteAPI(remote_schema + host, repository, token)
|
||||
elif remote_type == "gitlab":
|
||||
remote_schema = "https://" if schema == "ssh://" else schema
|
||||
return GitlabRemoteAPI(remote_schema + host, repository, token)
|
||||
elif remote_type == "bitbucket":
|
||||
return BitbucketRemoteAPI(repository, token)
|
||||
elif remote_type == "github":
|
||||
|
||||
@@ -101,7 +101,7 @@ uno nuevo.""",
|
||||
remote = base.io_choice("Remoto", remotes)
|
||||
|
||||
remote_type = base.io_choice(
|
||||
"Tipo de remoto:", ["bitbucket", "github", "gitea"]
|
||||
"Tipo de remoto:", ["bitbucket", "github", "gitea", "gitlab"]
|
||||
)
|
||||
|
||||
return (remote, remote_type)
|
||||
|
||||
Reference in New Issue
Block a user