azure-devops-cli-extension icon indicating copy to clipboard operation
azure-devops-cli-extension copied to clipboard

[Bug] Cannot query versionDescriptor.version with azure devops invoke

Open codars opened this issue 4 years ago • 1 comments

Describe the bug A clear and concise description of what the bug is.

According to az devops invoke Items - Get

I tried to get a file from azure-devops git with specific version:

az devops invoke --area git --resource items --route-parameters project="PROJECT"  repositoryId="REPO" --query-parameters path=README.md --api-version=5.1 --versionDescriptor.version="master" --media-type application/zip --out-file readme.zip

However, I got this error:

az: error: unrecognized arguments: --versionDescriptor.version=master

What should I do to fix this issue?

To Reproduce Azure Cli Version: Use az --version Look for something like- azure-cli (2.0.70)

Azure-Devops extension version: Use az --version Look for something like- Extensions: azure-devops (0.18.0)

Steps to reproduce the behavior:

  1. login using az login
  2. setup defaults..
  3. Run command....
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Debug logs Add the output of the command running it with debug mode (--debug)

Additional context Add any other context about the problem here.

codars avatar Jul 25 '20 05:07 codars

@codars it took me many hours to figure out. Here is a working command:

az devops invoke --area git --resource items 
  --route-parameters project=BestPractices repositoryId5xxx 
  --query-parameters scopePath=".sqlfluff" versionDescriptor[version]=master download=true 
  --accept-media-type application/zip 
  --out-file test.zip

Hope this still helps.

fmms avatar Mar 28 '23 18:03 fmms