Move RemoteInfo and CloneProto to info package

This commit is contained in:
2024-01-17 08:13:58 -05:00
parent 1e4e9147f1
commit f33199bd7b
12 changed files with 100 additions and 58 deletions

View File

@@ -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 {