git

package
v0.5.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRemoteUrls

func GetRemoteUrls(gitRepo string) ([]string, error)

GetRemoteUrls for a git repository from the given path

Types

type GitlabRemoteUrlInfo

type GitlabRemoteUrlInfo struct {
	// Hostname of the Gitlab Instance
	Hostname string
	// ClonedViaHttps indicates the remote url is HTTPs
	ClonedViaHttps bool
	// RepoSlug Is the full qualified name of the project without trailing .git
	RepoSlug string
}

GitlabRemoteUrlInfo contains information about a gitlab remote

func FilterGitlabRemoteUrls

func FilterGitlabRemoteUrls(remoteUrls []string) []GitlabRemoteUrlInfo

FilterGitlabRemoteUrls parses the remote urls and only returns ones that are potentially gitlab remote urls

func ParseGitlabRemoteUrlInfo

func ParseGitlabRemoteUrlInfo(remoteUrl string) (*GitlabRemoteUrlInfo, error)

ParseGitlabRemoteUrlInfo relevant for project detection for a given remote url string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL