We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68cf7c5 commit 45f6afbCopy full SHA for 45f6afb
src/github/githubRepository.ts
@@ -468,6 +468,9 @@ export class GitHubRepository implements vscode.Disposable {
468
469
if (data?.repository.pullRequests.nodes.length > 0) {
470
const prs = data.repository.pullRequests.nodes.map(node => parseGraphQLPullRequest(node, this)).filter(pr => pr.head?.repo.owner === headOwner);
471
+ if (prs.length === 0) {
472
+ return undefined;
473
+ }
474
const mostRecentOrOpenPr = prs.find(pr => pr.state.toLowerCase() === 'open') ?? prs[0];
475
return this.createOrUpdatePullRequestModel(mostRecentOrOpenPr);
476
}
0 commit comments