issue

package
v0.10.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Issue

type Issue struct {
	Type string // feat, fix, doc, etc…
	tracker.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.

func GetFromUser

func GetFromUser(ctx context.Context, p Prompter, allowedTypes []string) (*Issue, error)

GetFromUser drives the manual issue-input flow via p.PickIssueFromUser.

type IssueStartFlags

type IssueStartFlags struct {
	TrackerFirst bool
	Variant      string
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL