Is your feature request related to a problem? Please describe.
To be able to mimic something like Github's stacked PRs, I would need to be able to update the target branch of an active PR. This is possible via the DevOps site or the REST API, but the Azure CLI does not support it.
Describe the solution you'd like
Extend the az repos pr update with a --target-branch parameter, similar to how az repos pr create works.
--target-branch -t : Name of the target branch. If not specified, defaults to the
default branch of the target repository.
Additional context
Github's stacked PRs works by keeping a set of related branches in sync, and updating the related PRs to point to the upper branch in the stack.
- PR 1:
mystack/first -> develop
- PR 2:
mystack/second -> mystack/first
When any changes to the mystack/first branch are made, the mystack/second branch is rebased.
When PR 1 gets merged, PR 2 gets updated to point to develop instead.
Updates to the branches can be made with git commands, but changing the PR target branch is currently not possible from CLI.
This issue is just to add the target branch parameter, not to implement stacked PRs.
Is your feature request related to a problem? Please describe.
To be able to mimic something like Github's stacked PRs, I would need to be able to update the target branch of an active PR. This is possible via the DevOps site or the REST API, but the Azure CLI does not support it.
Describe the solution you'd like
Extend the
az repos pr updatewith a--target-branchparameter, similar to howaz repos pr createworks.Additional context
Github's stacked PRs works by keeping a set of related branches in sync, and updating the related PRs to point to the upper branch in the stack.
mystack/first->developmystack/second->mystack/firstWhen any changes to the
mystack/firstbranch are made, themystack/secondbranch is rebased.When PR 1 gets merged, PR 2 gets updated to point to
developinstead.Updates to the branches can be made with
gitcommands, but changing the PR target branch is currently not possible from CLI.This issue is just to add the target branch parameter, not to implement stacked PRs.