Handle error from ParsePRRefs when the selector is provided

This commit is contained in:
Tyler McGoffin 2025-01-31 14:37:19 -08:00
parent fa5325aec9
commit 601cf88852

View file

@ -201,7 +201,11 @@ func (f *finder) Find(opts FindOptions) (*api.PullRequest, ghrepo.Interface, err
f.prNumber = prNumber
} else {
f.branchName = opts.Selector
prRefs, _ = ParsePRRefs(f.branchName, git.BranchConfig{}, "", "", "", f.baseRefRepo, remotes.Remotes{})
// We don't expect an error here because parsedPushRevision is empty
prRefs, err = ParsePRRefs(f.branchName, git.BranchConfig{}, "", "", "", f.baseRefRepo, remotes.Remotes{})
if err != nil {
return nil, nil, err
}
}
}