Open javiplx opened 4 years ago
Reproduced with the following versions :
azure-cli 2.27.2
core 2.27.2
telemetry 1.0.6
Extensions:
azure-devops 0.20.0
Python (Linux) 3.6.10 (default, Aug 23 2021, 03:36:00)
I know it's kinda old, but I came across it only now
Try to add --branch
flag to the command
It worked in my case
Ex: az repos policy list --repository-id <repo_id> --branch <branch_name>
Adding the --branch
flag does workaround this issue, but this should still be considered a bug as you can't list all policies for the repository, regardless of the branch. If the --branch
flag is required, then this is not documented in the help for the command. The --branch
flag also does not appear to accept a wildcard value.
As a workaround you can filter with jq
, but this is not ideal.
az repos policy list | jq '.[] | select(.settings.scope[0].repositoryId == "<REPO_UUID>")'
Describe the bug
The argument
--repository-id
foraz repos policy
does not work as expected.Command Name
az repos policy list Extension Name: azure-devops. Version: 0.17.0.
Errors: No policy is listed although there are policies applied to that repositry
To Reproduce:
The two commands below should produce the same output, but only the seconds produces response
Expected Behavior
List the policies for the supplied repository id
Environment Summary