Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Issue ¶
Issue is the representation of a work item.
func GetFromTracker ¶
func GetFromTracker(ctx context.Context, p Prompter, t tracker.Tracker, allowedTypes []string) (*Issue, error)
GetFromTracker fetches issues via t.ListIssues, then either falls back to the manual path (PickIssueFromUser) on error/empty-list, or drives the tracker picker (PickIssueFromTracker). All form opening is delegated to p.
type IssueStartFlags ¶
type Prompter ¶ added in v0.9.6
type Prompter interface {
// PickIssueFromUser opens the manual issue-input form (issue ID, subject, type).
PickIssueFromUser(ctx context.Context, allowedTypes []string) (*Issue, error)
// PickIssueFromTracker opens the picker over a pre-fetched issues list.
PickIssueFromTracker(ctx context.Context, issues []tracker.Issue, allowedTypes []string) (*Issue, error)
// NotifyTrackerError shows a one-line error note when the tracker errors
// out or returns no open issues. Returning a non-nil error aborts the flow.
NotifyTrackerError(ctx context.Context, message string) error
}
Prompter is the sub-interface of cmd/issue.StartPrompter that this package uses to drive issue-input forms. It exists so GetFromUser and GetFromTracker can be invoked from tests without opening huh forms.
Click to show internal directories.
Click to hide internal directories.