Stop showing cached PRs when we no longer have a base remote

If we used to have a base remote (e.g. because there was only one), but now we
don't (e.g. because the user has added a second one, and we don't know yet which
one is the base), stop showing the cached PRs. This is especially important in
the case that the user cancels the prompt, in which case we don't have a base
remote for the rest of the session, but would keep showing the (potentially
stale) cached PRs forever.
This commit is contained in:
Stefan Haller 2026-04-25 14:21:37 +02:00
parent 0ecf818a73
commit 5b596bb62b

View file

@ -819,6 +819,9 @@ func (self *RefreshHelper) refreshGithubPullRequests() {
baseRemote := self.getGithubBaseRemote()
if baseRemote == nil {
self.c.Model().PullRequests = nil
self.c.Model().PullRequestsMap = nil
if !self.githubBaseRemotePromptDismissed[self.c.Git().RepoPaths.RepoPath()] {
self.promptForBaseGithubRepo(authToken)
}