Gitea remote support

This commit is contained in:
2024-01-16 14:26:56 -05:00
parent bd354842c0
commit 94bbff6d07
8 changed files with 49 additions and 10 deletions

View File

@ -1,6 +1,8 @@
package gitlabremote
import (
"fmt"
"github.com/xanzy/go-gitlab"
"gitlab.sweetwater.com/it/devops/tools/gitlab-project-manager/internal/remotes/remote"
)
@ -14,6 +16,11 @@ func (r *GitlabRemote) GetInfo() *remote.RemoteInfo {
return r.info
}
func (r *GitlabRemote) String() string {
return fmt.Sprintf("GitLab %s (%s), clone proto %s",
r.GetInfo().Name, r.GetInfo().Host, r.GetInfo().CloneProto)
}
func NewGitlabRemote(remoteInfo *remote.RemoteInfo) (*GitlabRemote, error) {
api, err := NewGitlabApi(remoteInfo)
if err != nil {