fix: seed issue create from --template, edit and delete inline review comments, explain workflow run refs (follow gh)

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-18 18:58:28 +02:00
1 parent 0db9ed463e
commit 2a221d0a81
9 files changed
+122 -21

No files matched your search

+6 -2
View File
@@ -36,7 +36,9 @@ type BodyEditor func(context.Context, string) (Draft, error)
// IssueFormChoices supplies options for an interactive issue create form.
type IssueFormChoices struct {
Templates []IssueTemplateChoice
Templates []IssueTemplateChoice
// Template, when set, is used instead of asking: the form starts with its body and an empty title.
Template *IssueTemplateChoice
Assignees []string
Milestones []IssueMilestoneChoice
Labels []IssueLabelChoice
@@ -64,7 +66,9 @@ type IssueForm interface {
// CreateIssue runs the interactive issue create form on stderr.
func (p *FormPrompter) CreateIssue(ctx context.Context, choices IssueFormChoices) (IssueFormValues, error) {
title, body := "", ""
if len(choices.Templates) > 0 {
if choices.Template != nil {
body = choices.Template.Body
} else if len(choices.Templates) > 0 {
options := []huh.Option[int]{huh.NewOption("[none]", -1)}
for i, template := range choices.Templates {
label := template.Name