Add an option to keep votes when moving the change to another branch.
The intention of this change is to support master -> main migration. Today, only the veto votes that are blocking the change from submission are moved to the destination branch. Adding an option allows admin to decide what to do with the votes when moving open changes, using a simple script. Added 'keepAllVotes' option so it is possible to move all votes. The option is only allowed to be used by admins at their own risk, because it affects the submission behavior of the change depending on the label access configuration and submission rules. We could squash the user votes to the allowed permission range: * In that case the original votes would be lost when moving back to the original branch. * It is expensive to call permission backend * The votes are often granted in the context of a specific branch Other options and considerations in the original discussion: Iae0443b16151 Change-Id: Ia197a779f93e928604a0d0ea3360825dcfbeb6d9
This commit is contained in:
@@ -1388,6 +1388,8 @@ Move a change.
|
||||
|
||||
The destination branch must be provided in the request body inside a
|
||||
link:#move-input[MoveInput] entity.
|
||||
Only veto votes that are blocking the change from submission are moved to
|
||||
the destination branch by default.
|
||||
|
||||
.Request
|
||||
----
|
||||
@@ -7354,6 +7356,11 @@ The `MoveInput` entity contains information for moving a change to a new branch.
|
||||
|`destination_branch`||Destination branch
|
||||
|`message` |optional|
|
||||
A message to be posted in this change's comments
|
||||
|`keep_all_labels` |optional, defaults to false|
|
||||
By default, only veto votes that are blocking the change from submission are moved to
|
||||
the destination branch. Using this option is only allowed for administrators,
|
||||
because it can affect the submission behaviour of the change (depending on the label access
|
||||
configuration and submissions rules).
|
||||
|===========================
|
||||
|
||||
[[notify-info]]
|
||||
|
||||
Reference in New Issue
Block a user