Skip to content

Proposal: New setting for default target branch when creating a pull request #1568

Closed

Description

At my company, we merge all feature branches into a development branch for QA and then at the end of the sprint the development branch gets merged into master for the production release. From what I can tell, using a dev branch is a standard practice that many companies follow. That being said, it would be nice to be able to set the default target for a given repo because right now the target always defaults to master (since it's the default branch for the repo) and I have to manually switch it to development every time I create a pull request.

I have seen other applications implement this in different ways. Prior to switching to VS Code, my team originally used WebStorm. In WebStorm, when you create a pull request you select a target branch from a drop down of all the branches in the repo. Then anytime you create a pull request after that it remembers the last value you selected until you change it again.

76516391-b91bbf80-6431-11ea-9260-b3b255fb6268

There is also another GitHub pull request extension that has a setting for a default target branch. However, that sets the default target across all repos and I think it would be better to be able to set the default target on a per repo basis.

That being said, I was thinking a new setting could be added called defaultTargets. I had two options in mind for how the setting could work. One option would be to have it be a simple array like this "githubPullRequests.defaultTargets": ["org/repo/defaultTarget", "org2/repo2/defaultTarget"]. Another option would be to have it be an array of objects if that would be clearer "githubPullRequests.defaultTargets": [{"repo": "org/repo", "target": "defaultTarget"}, {"repo": "org2/repo2", "target": "defaultTarget"}]. Then when creating a pull request, the ReviewManager would check to see if the repo you are currently in has a default target in the setting and if so that would be defaulted in the first input box ("Choose target branch for...") instead of the repo's default branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    feature-requestRequest for new features or functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions