Azure / azure-cli

Azure Command-Line Interface
MIT License
4.04k stars 3.01k forks source link

Add subcommand for `az repos pr` to list/add/delete tags #23627

Open celluj34 opened 2 years ago

celluj34 commented 2 years ago

Related command az repos pr

Is your feature request related to a problem? Please describe. I want to use the az cli in my CI/CD pipeline to read tags, but I have to use the REST api instead. It would be great if I could read the tags directly

Describe the solution you'd like az repos pr tags <command> --id 2582 --detect true, where command is list, add, and delete, and (for add and delete) takes an additional parameter which is the string of the tag to manipulate.

Describe alternatives you've considered I can currently list tags from the REST api, but that is cumbersome and not ideal when I can do other operations directly in the cli.

Additional context none

ghost commented 2 years ago

Thank you for your feedback. This has been routed to the support team for assistance.

yonzhan commented 2 years ago

route to CXP team

ghost commented 2 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @v-anvashist, @V-hmusukula.

Issue Details
**Related command** `az repos pr` **Is your feature request related to a problem? Please describe.** I want to use the az cli in my CI/CD pipeline to read tags, but I have to use the REST api instead. It would be great if I could read the tags directly **Describe the solution you'd like** `az repos pr tags --id 2582 --detect true`, where `command` is list, add, and delete, and (for add and delete) takes an additional parameter which is the string of the tag to manipulate. **Describe alternatives you've considered** I can currently list tags from the REST api, but that is cumbersome and not ideal when I can do other operations directly in the cli. **Additional context** none
Author: celluj34
Assignees: -
Labels: `Service Attention`, `customer-reported`, `DevOps`
Milestone: -
navba-MSFT commented 2 years ago

@celluj34 Adding Service team for devops issues.

@v-anvashist, @V-hmusukula. Could you please look into this and provide an update ?

celluj34 commented 2 years ago

Hello;

Has there been any updates on this?

v-anvashist commented 2 years ago

@celluj34 We are currently working on some high priority bugs This is feature request as currently we don't have this support in CLI service. https://learn.microsoft.com/en-us/cli/azure/repos/pr?view=azure-cli-latest#az-repos-pr-list

We need to work with API team. In CLI service we are only consuming the API's.

Could you please share the API details on it?

Thanks, Anjali

celluj34 commented 2 years ago

Here's a similar bug I have for the CLI (which you are tagged on also): https://github.com/Azure/azure-cli/issues/23626#issuecomment-1229777435

But I am using the REST API like so: https://dev.azure.com/<company>/<project>/_apis/git/repositories/<repo>/pullRequests/<pull_request_id>/labels, then parsing the JSON into a powershell object and doing other work.

KLuuKer commented 1 week ago

seems like the api exists now...

https://learn.microsoft.com/en-us/rest/api/azure/devops/git/pull-request-labels/create?view=azure-devops-rest-4.1