Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateFNVHash ¶
GenerateFNVHash generates a 64-bit FNV-1a hash from the input bytes
Types ¶
type GitRemoteInfo ¶ added in v0.1.30
type GitRemoteInfo struct {
Host string // e.g., "gitlab.com" or "gitlab.example.com"
ProjectPath string // e.g., "group/project" or "group/subgroup/project"
URL string // The full GitLab URL, e.g., "https://gitlab.com"
}
GitRemoteInfo contains parsed information from a git remote URL
func DetectGitRemote ¶ added in v0.1.30
func DetectGitRemote() *GitRemoteInfo
DetectGitRemote attempts to detect GitLab URL and project path from git remote. It tries the "origin" remote first. Returns nil if detection fails (not a git repo, no remote, not a GitLab URL, etc.)
func ParseGitRemoteURL ¶ added in v0.1.30
func ParseGitRemoteURL(remoteURL string) *GitRemoteInfo
ParseGitRemoteURL parses a git remote URL and extracts host and project path. Supports the following formats:
- SSH URL: ssh://git@host[:port]/group/project.git
- SSH SCP-like: git@host:group/project.git
- HTTPS: https://host[:port]/group/project.git
- Git protocol: git://host[:port]/group/project.git
Returns nil if the URL cannot be parsed.
Click to show internal directories.
Click to hide internal directories.