Azure / Azure/azure-cli

az repos policy merge-strategy update

Open
#17,723 4 comments 0 reactions 0 assignees View on GitHub
act-platform-engineering-squad DevOps question Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

> ### `az feedback` auto-generates most of the information requested below, as of CLI version 2.0.62

**Describe the bug**
We wanted to implement merge strategy policies in Azure DevOps which is to ensure the Pull Requests are merged using “squash commit” mode only. But while running the pipeline by using Az CLI command we are facing the this invalid literal issue.

**To Reproduce**
az repos policy merge-strategy update --policy-id fa4e907d-c16b-4a4c-9dfa-4916e5d171ab --allow-no-fast-forward false --allow-rebase false --allow-rebase-merge false --allow-squash true --blocking false --branch main --enabled true --org https://dev.azure.com/xyz/ --project --repository-id

**Expected behavior**
It should allow only Squash rest merge type should be blocked

**Environment summary**
Install Method CLI version (`az --version`)

**Additional context**
While running the above command in az cli, we are encountering the following error:
ERROR: invalid literal for int() with base 10: ‘fa4e907d-c16b-4a4c-9dfa-4916e5d171ab’
##[error]Script failed with exit code: 1
![image](https://user-images.githubusercontent.com/82589046/114963213-d703f100-9e89-11eb-91cb-ccbd9ffec6c6.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.