Don't prompt to fetch additional remotes when user explicitly configures them#8219
Merged
Don't prompt to fetch additional remotes when user explicitly configures them#8219
Conversation
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
When users explicitly configure githubPullRequests.remotes, the extension should automatically fetch from all configured remotes instead of prompting "Continue fetching from other remotes" after finding results in the first one. This change modifies the fetchPagedData method to detect when remotes have been explicitly configured (via global, workspace, or folder settings) and skips the early break logic that was causing the prompt to appear. Fixes microsoft/vscode-pull-request-github#XXXXX Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
- Renamed hasExplicitRemotesConfig to hasUserConfiguredRemotes for clarity - Extracted complex conditional logic into well-named boolean variables (hasReceivedData, isFetchingNextPage, hasReachedPreviousFetchLimit, shouldBreakEarly) to improve readability and make the logic more self-documenting Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix issue with fetching additional remotes
Don't prompt to fetch additional remotes when user explicitly configures them
Dec 8, 2025
alexr00
requested changes
Dec 11, 2025
Member
alexr00
left a comment
There was a problem hiding this comment.
Now the "load more" doesn't show. We still want that to show, just not the "continue fetching from other remotes".
When user configures remotes and we loop through all of them, we should preserve itemData.hasMorePages so that the "Load more" button appears if any repository has more pages. Previously, we were returning hasMorePages: false which prevented the "Load more" button from showing. Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Contributor
Author
Fixed in commit ac92efd. Changed the final return to preserve |
alexr00
approved these changes
Dec 11, 2025
bpasero
approved these changes
Dec 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
githubPullRequests.remoteswith explicit remotes, the system should automatically fetch from all configured remotes instead of prompting "Continue fetching from other remotes"fetchPagedDatamethod (folderRepositoryManager.ts), the loop breaks early after finding results from first remote, causinghasUnsearchedRepositoriesto be truefetchPagedDatato continue through all configured remotes when user has explicitly set themSummary
The fix now correctly:
itemData.hasMorePages)Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.