Documentation
¶
Overview ¶
Package git provides git repository detection and context
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var TaskCodePattern = regexp.MustCompile(`([A-Z]{2,5})-(\d+)`)
TaskCodePattern matches task codes like ABC-123 Each GitScrum project has its own prefix (e.g., GS, WEB, API)
Functions ¶
func FindRepoRoot ¶
FindRepoRoot finds the root of the git repository
Types ¶
type Context ¶
type Context struct {
// RepoPath is the root path of the repository
RepoPath string
// RootPath is alias for RepoPath (for compatibility)
RootPath string
// Branch is the current branch name
Branch string
// RemoteURL is the origin remote URL
RemoteURL string
// TaskCode extracted from branch (e.g., GS-123)
TaskCode string
// Provider is github/gitlab/bitbucket
Provider string
// RepoFullName is owner/repo format
RepoFullName string
}
Context holds git repository information
func NewContext ¶
NewContext is an alias for ResolveContext (for compatibility)
func ResolveContext ¶
ResolveContext detects git context from current directory
Click to show internal directories.
Click to hide internal directories.