Address PR comments

This commit is contained in:
Tyler McGoffin 2025-01-31 14:55:24 -08:00
parent e428b9c66c
commit 877871f1e0
2 changed files with 3 additions and 4 deletions

View file

@ -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")
}

View file

@ -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,
}),
},