Azure / azure-devops-cli-extension

Azure DevOps Extension for Azure CLI
https://docs.microsoft.com/en-us/cli/azure/ext/azure-devops/?view=azure-cli-latest
MIT License
617 stars 239 forks source link

[Feature Request] Extend `--detect` to use environment variables available when running in Azure Pipelines #1368

Open jessehouwing opened 9 months ago

jessehouwing commented 9 months ago

Is your feature request related to a problem? Please describe. Azure Pipelines must be one of the key platforms on which az devops is employed. Azure Pipelines sets a number of environment variables that point to the current repository.

It would be nice if --detect would be able to leverage these variables

Describe the solution you'd like

Azure pipelines always sets these two variables:

      --organization $env:SYSTEM_COLLECTIONURI `
      --project $env:SYSTEM_TEAMPROJECT

When using --detect to automatically detect the organization or project, it should pick up these variables.

Why?

Why not?

Additional context Add any other context or screenshots about the feature request here.