cli/cli · error · NotFoundError
no pull requests found
Error message
no pull requests found
What it means
Error "no pull requests found" thrown in cli/cli.
Source
Thrown at pkg/cmd/pr/shared/finder.go:263
}
}
var pr *api.PullRequest
if f.prNumber > 0 {
pr, err = findByNumber(httpClient, f.baseRefRepo, f.prNumber, fields.ToSlice())
if err != nil {
return pr, f.baseRefRepo, err
}
} else if prRefs.BaseRepo() != nil && f.branchName != "" {
// No PR number, but we have a base repo and branch name.
pr, err = findForRefs(httpClient, prRefs, opts.States, fields.ToSlice())
if err != nil {
return pr, f.baseRefRepo, err
}
} else {
// If we don't have a PR number or a base repo and branch name,
// we can't do anything
return nil, f.baseRefRepo, &NotFoundError{fmt.Errorf("no pull requests found")}
}
g, _ := errgroup.WithContext(context.Background())
if fields.Contains("reviews") {
g.Go(func() error {
return preloadPrReviews(httpClient, f.baseRefRepo, pr)
})
}
if fields.Contains("comments") {
g.Go(func() error {
return preloadPrComments(httpClient, f.baseRefRepo, pr)
})
}
if fields.Contains("closingIssuesReferences") {
g.Go(func() error {
return preloadPrClosingIssuesReferences(httpClient, f.baseRefRepo, pr)
})
}View on GitHub (pinned to 0eeec0b92e)
Solutions
- Specify the pull request explicitly by number, URL, or branch.
When it happens
Trigger: Thrown at pkg/cmd/pr/shared/finder.go:263 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of cli/cli@0eeec0b92e (2026-08-15).
Data as JSON: /api/errors/2566b4a56e8ba087.
Report an issue: GitHub.