diff --git a/pkg/cmd/pr/shared/finder.go b/pkg/cmd/pr/shared/finder.go index 332baa857..a54528527 100644 --- a/pkg/cmd/pr/shared/finder.go +++ b/pkg/cmd/pr/shared/finder.go @@ -121,7 +121,6 @@ func (s *PullRequestRefs) GetPRHeadLabel() string { func (f *finder) Find(opts FindOptions) (*api.PullRequest, ghrepo.Interface, error) { // If we have a URL, we don't need git stuff - if len(opts.Fields) == 0 { return nil, nil, errors.New("Find error: no fields specified") } diff --git a/pkg/cmd/pr/shared/finder_test.go b/pkg/cmd/pr/shared/finder_test.go index 435377d9c..36551ab42 100644 --- a/pkg/cmd/pr/shared/finder_test.go +++ b/pkg/cmd/pr/shared/finder_test.go @@ -219,17 +219,17 @@ func TestFind(t *testing.T) { baseRepoFn: nil, branchFn: func() (string, error) { return "", &git.GitError{ - Stderr: "fatal: not a git repository (or any of the parent directories): .git", + Stderr: "fatal: branchFn error", ExitCode: 128, } }, branchConfig: stubBranchConfig(git.BranchConfig{}, &git.GitError{ - Stderr: "fatal: not a git repository (or any of the parent directories): .git", + Stderr: "fatal: branchConfig error", ExitCode: 128, }), pushDefault: stubPushDefault("simple", nil), remotePushDefault: stubRemotePushDefault("", &git.GitError{ - Stderr: "fatal: not a git repository (or any of the parent directories): .git", + Stderr: "fatal: remotePushDefault error", ExitCode: 128, }), },