diff --git a/internal/app/checkout_test.go b/internal/app/checkout_test.go index 4ea5860c..26d5546b 100644 --- a/internal/app/checkout_test.go +++ b/internal/app/checkout_test.go @@ -134,11 +134,14 @@ func TestCheckoutNamesTheBranchAfterTheHead(t *testing.T) { {"deleted head", services.Pull{Number: 7, Head: "feature", HeadRemoteDeleted: true}, nil, "pr/7"}, {"fork branch at the head without upstream", fork, map[string]string{"rev-parse --verify refs/heads/feature^{commit}": "abc123"}, "feature"}, {"fork default branch tracking origin", services.Pull{Number: 7, Head: "main", HeadSHA: "abc123", HeadRepo: "bob/project"}, map[string]string{ - "rev-parse --verify refs/heads/main^{commit}": "abc123", "config --get branch.main.remote": "origin"}, "bob/main"}, + "rev-parse --verify refs/heads/main^{commit}": "abc123", "config --get branch.main.remote": "origin", + }, "bob/main"}, {"branch above the head name", services.Pull{Number: 7, Head: "feature/login", HeadSHA: "abc123", HeadRepo: "alice/project"}, map[string]string{ - "rev-parse --verify refs/heads/feature^{commit}": "other"}, "pr/7"}, + "rev-parse --verify refs/heads/feature^{commit}": "other", + }, "pr/7"}, {"branches below the head name", same, map[string]string{ - "for-each-ref --count=1 --format=%(refname) refs/heads/feature/": "refs/heads/feature/login"}, "pr/7"}, + "for-each-ref --count=1 --format=%(refname) refs/heads/feature/": "refs/heads/feature/login", + }, "pr/7"}, } { t.Run(tc.name, func(t *testing.T) { deps, _, _ := testDeps(t) diff --git a/internal/app/editor_test.go b/internal/app/editor_test.go index a5bfff74..4b19b480 100644 --- a/internal/app/editor_test.go +++ b/internal/app/editor_test.go @@ -333,7 +333,7 @@ func TestBodyEditorTypesInlineWithoutAnEditor(t *testing.T) { require.Equal(t, []string{terminal.BodyTitle + " ## Steps"}, prompt.texts) // The typed body is kept like an editor draft: reported when the command fails, removed when it succeeds. requireDraft(t, draft.Path, true) - var failed error = errors.New("create failed") + failed := errors.New("create failed") finishDraft(&draft, &failed) require.ErrorContains(t, failed, "draft saved at "+draft.Path) requireDraft(t, draft.Path, true) diff --git a/internal/terminal/issue_form.go b/internal/terminal/issue_form.go index d45cf69a..4332988b 100644 --- a/internal/terminal/issue_form.go +++ b/internal/terminal/issue_form.go @@ -199,7 +199,7 @@ func (p *FormPrompter) collectIssueProperties(ctx context.Context, title, body s if err := p.runForm(ctx, huh.NewForm(content)); err != nil { return IssueFormValues{}, err } - // The body comes before "What's next?", so cancelling still reports the draft. + // The body comes before "What's next?", so canceling still reports the draft. if values.Body, values.Draft, err = editBody(ctx, choices.EditBody, fields.body); err != nil { return values, err }