Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BranchNamingSuggestion ¶
BranchNamingSuggestion returns a suggestion message for when no task ID is found.
Types ¶
type Client ¶
type Client struct{}
Client wraps git command execution.
func (*Client) CurrentBranch ¶
CurrentBranch returns the current git branch name.
func (*Client) IsInsideWorkTree ¶
IsInsideWorkTree checks if the current directory is inside a git repository.
func (*Client) LatestCommitMessage ¶
LatestCommitMessage returns the subject line of the latest commit.
func (*Client) LatestCommitSHA ¶
LatestCommitSHA returns the SHA of the latest commit.
type RepoContext ¶
type RepoContext struct {
Branch string
RemoteURL string
TaskID *TaskIDResult
RepoOwner string
RepoName string
}
RepoContext holds detected git context information.
func DetectContext ¶
func DetectContext() (*RepoContext, error)
DetectContext gathers full git context from the current repository.
type TaskIDResult ¶
type TaskIDResult struct {
// Raw is the full matched string (e.g., "CU-ae27de" or "PROJ-42")
Raw string
// ID is the task identifier suitable for API calls
ID string
// IsCustomID indicates whether this is a custom prefix ID vs a CU- ID
IsCustomID bool
}
TaskIDResult holds a parsed task ID from a branch name.
func ExtractTaskID ¶
func ExtractTaskID(branch string) *TaskIDResult
ExtractTaskID attempts to find a ClickUp task ID in a branch name. It tries CU-{hex} first, then PREFIX-{number} patterns.
func ParseTaskID ¶ added in v0.9.1
func ParseTaskID(input string) *TaskIDResult
ParseTaskID normalizes a task ID string passed as a CLI argument. It handles CU- prefixed IDs (stripping the prefix), custom prefix IDs (e.g., PROJ-42), and raw IDs (returned as-is).