Documentation
¶
Index ¶
Constants ¶
const MaxSlugLen = 50
MaxSlugLen caps the slugged title length. Combined with a typical issue ID and type, this keeps the full branch name comfortably under ~100 chars even when an operator adds --variant.
Variables ¶
This section is empty.
Functions ¶
func CutReviewSuffix ¶ added in v0.13.1
CutReviewSuffix returns the issue slug for a review branch name, and whether name was a review branch.
func IsReviewBranch ¶ added in v0.13.1
IsReviewBranch reports whether name is a review branch ("<slug>@review").
func ReviewBranchName ¶ added in v0.13.1
ReviewBranchName returns the review branch name for an issue slug: "<issueSlug>@review".
Types ¶
type Branch ¶
type Branch struct {
// contains filtered or unexported fields
}
Branch is the parsed shape of a git-zf branch name.
3-part name: <issueID>@<type>@<slug> — default 4-part name: <issueID>@<type>@<slug>@<variant> — opt-in via --variant
Legacy branches with an 8-hex random suffix parse as 4-part with the suffix exposed verbatim via Variant(). The system no longer distinguishes legacy hex from operator-supplied labels.
func New ¶
New constructs a Branch.
variant == "" → 3-part name
variant != "" → 4-part name; the variant is slugged and rejected
if the result is empty.