Move RemoteInfo and CloneProto to info package
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
|
||||
"github.com/pterm/pterm"
|
||||
"github.com/xanzy/go-gitlab"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/info"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/projects"
|
||||
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/remote"
|
||||
)
|
||||
@@ -22,10 +23,10 @@ var (
|
||||
defApiWaitMax time.Duration = 5 * time.Second
|
||||
)
|
||||
|
||||
func NewGitlabApi(info *remote.RemoteInfo) (*gitlab.Client, error) {
|
||||
func NewGitlabApi(remoteInfo *info.RemoteInfo) (*gitlab.Client, error) {
|
||||
client, err := gitlab.NewClient(
|
||||
info.Token,
|
||||
gitlab.WithBaseURL(info.Host),
|
||||
remoteInfo.Token,
|
||||
gitlab.WithBaseURL(remoteInfo.Host),
|
||||
gitlab.WithCustomRetryWaitMinMax(defApiWaitMin, defApiWaitMax),
|
||||
)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user