autodetect label #12
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
nagonag
nagonag/ignore
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
heiko/fj#12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
If there as a label (--label) or label:, match it with existing ones. If
we find a non-ambigous match, autocorrect it. Otherwise fail with an
explanative message and list the possible values, emphasize (color) the
best matches.
Same for milestones.
Plan
Matching strategy — unified
matchCandidates(input, choices)helper, scoring:Highest-scoring tier wins. Within a tier, ties = ambiguous.
Behaviour
label: using "Bug" for "bg".Applies to:
resolveLabelsininternal/cli/editor.go(replaces currentclosestLabelwhich silently picks the first substring hit even when ambiguous).resolveMilestoneininternal/cli/editor.go(currently has no fuzzy path at all).Color — gated on
useColor(). Use bold (\x1b[1m…\x1b[0m); label hex colors are unrelated and only used elsewhere for rendering label chips.Tests — extend
editor_test.gowith: unique prefix autocorrect, unique substring autocorrect, ambiguous error, milestone fuzzy autocorrect, milestone ambiguous error.Branch:
issue-12-autodetect-label.ius:ai:claude-opus-4-7