Documentation
¶
Overview ¶
Package ticket turns what a user types into the exact names flow uses on disk. The naming rules here are load-bearing: the branch and worktree use a hyphen between ID and slug, the assets directory uses an underscore, and both must be reproduced identically on every later invocation.
Index ¶
Constants ¶
const MaxSlugLen = 60
MaxSlugLen bounds the slug so that worktree paths stay manageable.
Variables ¶
This section is empty.
Functions ¶
func IDFromBranch ¶
IDFromBranch extracts a ticket ID from a branch name, for branches flow did not create itself.
func LooksLikeID ¶
LooksLikeID reports whether s could be a ticket ID, so that commands taking an optional ticket argument can tell one from a flag value.
func NormalizeID ¶
NormalizeID uppercases and validates a ticket ID: "rd-19471" becomes "RD-19471", and anything that is not PROJECT-NUMBER is rejected.
Types ¶
type ErrInvalid ¶
ErrInvalid reports input flow cannot turn into a ticket. Callers map it to exit code 2.
func (*ErrInvalid) Error ¶
func (e *ErrInvalid) Error() string