microsoft / vscode-pull-request-github

GitHub Pull Requests for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github
MIT License
2.3k stars 575 forks source link

Support showing more branches when a repository has many branches #2840

Open ymulenll opened 3 years ago

ymulenll commented 3 years ago

I am trying to create a Pull Request, but I cannot find the branch to merge into it (I am looking for the branch develop).

It started to happen a couple of versions ago, the issue is probably happening because we have thousands of branches (most of them associated with merged PRs), and the extension is just displaying a bunch of them (like 900) but not all we have.

Some versions ago, the extension was selecting the default branch to merge into (develop), but now it not even displaying it.

Steps to Reproduce:

  1. GitHub Pull Requests: Create Pull Request

joshuaobrien commented 3 years ago

I am experiencing this issue also. I've started working on a fix.

alexr00 commented 3 years ago

For users who have many branches, the extension would just freeze. We now have a timeout so that we don't freeze, but it does mean that not all branches will show.

Giljjj commented 2 weeks ago

Currently listBranches timeout limit is hard-coded: https://github.com/microsoft/vscode-pull-request-github/blob/1066de65a43160544005a5f5d98efd8b779b8e59/src/github/githubRepository.ts#L1160

We are hitting this limit and cannot find relevant branches. We do not mind waiting longer if it means we can find the branches we are working with.

Maybe this value can be configurable in the settings? This will allow everyone to customize the balance between showing complete results and the extension responsiveness.

alexr00 commented 2 weeks ago

If anyone wants to contribute such a setting I would accept a PR for it! In addition to a setting, we would ideally save recently used branches and show those immediately.