vscode-pull-request-github icon indicating copy to clipboard operation
vscode-pull-request-github copied to clipboard

Support showing more branches when a repository has many branches

Open ymulenll opened this issue 4 years ago • 6 comments

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.

  • Extension version: 0.28.0
  • VSCode Version: 1.59.0-insider
  • OS: Windows 10

Steps to Reproduce:

  1. GitHub Pull Requests: Create Pull Request

ymulenll avatar Jul 16 '21 20:07 ymulenll

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

joshuaobrien avatar Jul 17 '21 02:07 joshuaobrien

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.

alexr00 avatar Jul 27 '21 12:07 alexr00

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.

Giljjj avatar Sep 17 '24 18:09 Giljjj

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.

alexr00 avatar Sep 17 '24 18:09 alexr00

Hi @alexr00.

I would like to try this issue as a first time OSS contributor. But I do not fully understand this issue.

What should I do to solve this problem? I would modify the code mentioned in the comment to allow users to set their own I will modify code mentioned in the comment so that users can configure it themselves.

Can what I do solve this problem with that?

libra850 avatar Mar 01 '25 08:03 libra850

@libra850 that would help, but I think we should also keep track of the the recently used branches and show those immediately.

alexr00 avatar Mar 03 '25 09:03 alexr00