Documentation
¶
Overview ¶
Package git provides small helpers for interacting with the local git repository — detecting the Bitbucket workspace/repo from the origin remote, reading the current branch, and running git commands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentBranch ¶
CurrentBranch returns the name of the currently checked-out branch.
func DetectRepo ¶
DetectRepo returns the Bitbucket workspace and repo slug for the current directory by inspecting the origin remote.
func ParseRemoteURL ¶
ParseRemoteURL extracts the workspace and repo slug from a Bitbucket remote URL (SSH, HTTPS, or ssh:// form).
func ValidateCloneURL ¶
ValidateCloneURL accepts only Bitbucket Cloud's HTTPS and SSH clone URLs. Reject Git options, local paths and remote-helper protocols before invoking Git.
Types ¶
This section is empty.