func SelectIssue(ids []IssueDescription, color bool) (IssueDescription, error) {
	idx, err := fuzzyfinder.Find(ids, func(i int) string {
		return ids[i].ShortFormat()
	},
		fuzzyfinder.WithPreviewWindow(func(i, _, _ int) string {
			if i == -1 {
				return ""
			}
			return ids[i].Format(color)
		}))
	if err != nil {
		return IssueDescription{}, err
	}
	return ids[idx], nil
}
SelectIssue prompts a fuzzy finder and returns the selected IssueDescription
or an error if something unexpected happened
package integrations
import (
	"fmt"
	"strings"
	"github.com/b4nst/turbogit/pkg/format"
	"github.com/hpcloud/golor"
	"github.com/ktr0731/go-fuzzyfinder"
)
type IssueDescription struct {
	ID string
	Name string
	Description string
	Provider string
	Type string
}
func (id IssueDescription) Format(color bool) string {
	var sb strings.Builder
	if color {
		id.ID = golor.Colorize(id.ID, golor.G, -1)
		id.Provider = golor.Colorize(id.Provider, golor.AssignColor(id.Provider), -1)
	}
	sb.WriteString(id.ID)
	sb.WriteString(" - ")
	sb.WriteString(id.Name)
	if id.Description != "" {
		sb.WriteString("\n\n")
		sb.WriteString(id.Description)
	}
	sb.WriteString("\n\n")
	sb.WriteString("Issue provided by ")
	sb.WriteString(id.Provider)
	return sb.String()
}
func (id IssueDescription) ShortFormat() string {
	return fmt.Sprintf("%s - %s", id.ID, id.Name)
}
func (id IssueDescription) ToBranch(rwtype map[string]string) format.TugBranch {
	return format.TugBranch{Prefix: id.ID, Description: id.Name}.WithType(id.Type, rwtype)
}