Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FullNameFromURL ¶
FullName returns the the repo with its namespace (like profclems/glab). Respects group and subgroups names
func RemoteURL ¶
func RemoteURL(project *gitlab.Project, a *RemoteArgs) (string, error)
RemoteURL returns correct git clone URL of a repo based on the user's git_protocol preference
Types ¶
type Interface ¶
type Interface interface { RepoName() string RepoOwner() string RepoHost() string FullName() string }
Interface describes an object that represents a GitLab repository
func FromFullName ¶
FromFullName extracts the GitLab repository information from the following formats: "OWNER/REPO", "HOST/OWNER/REPO", "HOST/GROUP/NAMESPACE/REPO", and a full URL.
func NewWithHost ¶
NewWithHost is like New with an explicit host name
type Remote ¶
Remote represents a git remote mapped to a GitLab repository
type RemoteArgs ¶
type Remotes ¶
type Remotes []*Remote
Remotes represents a set of git remotes
func TranslateRemotes ¶
func TranslateRemotes(gitRemotes git.RemoteSet, urlTranslate func(*url.URL) *url.URL) (remotes Remotes)
TODO: accept an interface instead of git.RemoteSet
func (Remotes) FindByName ¶
FindByName returns the first Remote whose name matches the list
func (Remotes) FindByRepo ¶
FindByRepo returns the first Remote that points to a specific GitLab repository
type ResolvedRemotes ¶
type ResolvedRemotes struct {
// contains filtered or unexported fields
}
func ResolveRemotesToRepos ¶
func ResolveRemotesToRepos(remotes Remotes, client *gitlab.Client, base string) (*ResolvedRemotes, error)
func (*ResolvedRemotes) BaseRepo ¶
func (r *ResolvedRemotes) BaseRepo(prompt bool) (Interface, error)
func (*ResolvedRemotes) HeadRepos ¶
func (r *ResolvedRemotes) HeadRepos() ([]*gitlab.Project, error)
func (*ResolvedRemotes) RemoteForRepo ¶
func (r *ResolvedRemotes) RemoteForRepo(repo Interface) (*Remote, error)
RemoteForRepo finds the git remote that points to a repository