Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseRemoteURL ¶
ParseRemoteURL extracts the provider and project from a git remote URL. Supports SSH and HTTPS formats for GitHub and GitLab (including subgroups).
func SlugifyBranch ¶
SlugifyBranch converts a branch name to a URL-safe slug. e.g., "feat/my-feature" → "feat-my-feature"
Types ¶
type GitContext ¶
type GitContext struct {
Provider string // "gitlab" or "github"
Project string // "org/repo" or "group/subgroup/repo"
Branch string // current branch name
RemoteURL string // raw remote URL
}
GitContext holds the detected git repository context.
func Detect ¶
func Detect() (*GitContext, error)
Detect auto-detects git context from the current working directory. It runs git commands to determine the current branch and remote URL.
Click to show internal directories.
Click to hide internal directories.