issue #2329: fix the linting issue

This commit is contained in:
nilvng 2024-11-17 14:21:21 +11:00
parent 4386fcb4e5
commit 1832c1a767
4 changed files with 7 additions and 6 deletions

View file

@ -10,7 +10,7 @@ import (
"github.com/cli/cli/v2/pkg/httpmock" "github.com/cli/cli/v2/pkg/httpmock"
) )
func Test_listPullRequests(t *testing.T) { func Test_ListPullRequests(t *testing.T) {
type args struct { type args struct {
repo ghrepo.Interface repo ghrepo.Interface
filters prShared.FilterOptions filters prShared.FilterOptions
@ -153,9 +153,9 @@ func Test_listPullRequests(t *testing.T) {
} }
httpClient := &http.Client{Transport: reg} 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 { 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 return
} }
}) })

View file

@ -368,7 +368,7 @@ func TestPRList_withProjectItems(t *testing.T) {
})) }))
client := &http.Client{Transport: reg} client := &http.Client{Transport: reg}
prsAndTotalCount, err := listPullRequests( prsAndTotalCount, err := ListPullRequests(
client, client,
ghrepo.New("OWNER", "REPO"), ghrepo.New("OWNER", "REPO"),
prShared.FilterOptions{ prShared.FilterOptions{
@ -437,7 +437,7 @@ func TestPRList_Search_withProjectItems(t *testing.T) {
})) }))
client := &http.Client{Transport: reg} client := &http.Client{Transport: reg}
prsAndTotalCount, err := listPullRequests( prsAndTotalCount, err := ListPullRequests(
client, client,
ghrepo.New("OWNER", "REPO"), ghrepo.New("OWNER", "REPO"),
prShared.FilterOptions{ prShared.FilterOptions{

View file

@ -22,6 +22,7 @@ type InputType int
type Prompter interface { type Prompter interface {
Select(string, string, []string) (int, error) Select(string, string, []string) (int, error)
} }
const ( const (
InputTypeEditor InputType = iota InputTypeEditor InputType = iota
InputTypeInline InputTypeInline