diff --git a/pkg/cmd/pr/checkout/checkout.go b/pkg/cmd/pr/checkout/checkout.go index 0c3cb2571..54c0cae93 100644 --- a/pkg/cmd/pr/checkout/checkout.go +++ b/pkg/cmd/pr/checkout/checkout.go @@ -88,7 +88,7 @@ func checkoutRun(opts *CheckoutOptions) error { Selector: opts.SelectorArg, Fields: []string{ "number", - "headRefName", + "headRefName", "headRepository", "headRepositoryOwner", "isCrossRepository", diff --git a/pkg/cmd/pr/list/http_test.go b/pkg/cmd/pr/list/http_test.go index 95230245b..060e3a179 100644 --- a/pkg/cmd/pr/list/http_test.go +++ b/pkg/cmd/pr/list/http_test.go @@ -10,7 +10,7 @@ import ( "github.com/cli/cli/v2/pkg/httpmock" ) -func Test_listPullRequests(t *testing.T) { +func Test_ListPullRequests(t *testing.T) { type args struct { repo ghrepo.Interface filters prShared.FilterOptions @@ -153,9 +153,9 @@ func Test_listPullRequests(t *testing.T) { } httpClient := &http.Client{Transport: reg} - _, err := listPullRequests(httpClient, tt.args.repo, tt.args.filters, tt.args.limit) + _, err := ListPullRequests(httpClient, tt.args.repo, tt.args.filters, tt.args.limit) if (err != nil) != tt.wantErr { - t.Errorf("listPullRequests() error = %v, wantErr %v", err, tt.wantErr) + t.Errorf("ListPullRequests() error = %v, wantErr %v", err, tt.wantErr) return } }) diff --git a/pkg/cmd/pr/list/list_test.go b/pkg/cmd/pr/list/list_test.go index ecd0326b5..7ee111afc 100644 --- a/pkg/cmd/pr/list/list_test.go +++ b/pkg/cmd/pr/list/list_test.go @@ -368,7 +368,7 @@ func TestPRList_withProjectItems(t *testing.T) { })) client := &http.Client{Transport: reg} - prsAndTotalCount, err := listPullRequests( + prsAndTotalCount, err := ListPullRequests( client, ghrepo.New("OWNER", "REPO"), prShared.FilterOptions{ @@ -437,7 +437,7 @@ func TestPRList_Search_withProjectItems(t *testing.T) { })) client := &http.Client{Transport: reg} - prsAndTotalCount, err := listPullRequests( + prsAndTotalCount, err := ListPullRequests( client, ghrepo.New("OWNER", "REPO"), prShared.FilterOptions{ diff --git a/pkg/cmd/pr/shared/commentable.go b/pkg/cmd/pr/shared/commentable.go index 46a71a2b4..342898687 100644 --- a/pkg/cmd/pr/shared/commentable.go +++ b/pkg/cmd/pr/shared/commentable.go @@ -22,6 +22,7 @@ type InputType int type Prompter interface { Select(string, string, []string) (int, error) } + const ( InputTypeEditor InputType = iota InputTypeInline