microsoft / azure-devops-intellij

IntelliJ IDEA plug-in for Visual Studio Team Services and Team Foundation Server (TFS)
MIT License
151 stars 95 forks source link

Pull Request dialog - preselect origin/main if master does not exists #472

Open baltuonis opened 2 years ago

baltuonis commented 2 years ago

As more and more organizations are switching to main branch instead of master - could you please preselect origin/main branch in Pull Request dialog in case origin/master does not exist.

Now the dialog just preselects any top of the list branch and ones has to manually change on every pull request.

I assume it shouldn't take too much of an effort to fix it.

wietlol commented 2 years ago

Looking at the code, the fix should be that in the following code https://github.com/microsoft/azure-devops-intellij/blob/ffc225fa149e48db9870e521ae5cfcc20ee66c69/plugin/src/com/microsoft/alm/plugin/idea/git/utils/TfGitHelper.java#L144 the filter should accept both master and main. (potentially configurable branches (with implementation something like an endswith) could be added so people can choose which default branches pull requests can be made to)

This would definitely help a lot.