Skip to content

Commit

Permalink
Fix request values for Repo merge strategy policy (#898)
Browse files Browse the repository at this point in the history
  • Loading branch information
atbagga committed Nov 27, 2019
1 parent 87e63e0 commit bc777c5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions azure-devops/azext_devops/dev/repos/policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,10 @@ def update_policy_merge_strategy(policy_id,
if [i for i, value in enumerate(current_setting_new_merge_values_array) if value is not None]:
param_name_array = ['allowSquash', 'allowRebase', 'allowRebaseMerge', 'allowNoFastForward']
param_value_array = current_setting_new_merge_values_array
# We cannot send setting as None in the API
for i, value in enumerate(param_value_array):
if value is None:
param_value_array[i] = False
# Current setting is legacy option
else:
param_name_array = ['useSquashMerge']
Expand Down

0 comments on commit bc777c5

Please sign in to comment.