microsoft / microsoft/azure-devops-python-api
Is there a way to get the same contents from the python sdk as from the az cli?
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 684
- Forks
- 218
- Merge medio
- 8 d 10 h
- PR fusionados (30 d)
- 1
Descripción
I'm trying to harvest information from our pipelines/repositories for governance purposes. I want to create a dashboard of some sort. For this I need to pull information from our project and all its repos and pipelines.
If I use the python sdk's pipeline_client I get this output:
{
'_links': {},
'folder': '\\',
'id': 337,
'name': 'pipelineName',
'revision': 37,
'url': 'https://dev.azure.com/orgnanization/d48489-c201-8sun3-952e-83e5a8593c66/_apis/pipelines/337?revision=37'
}
If I use the azure cli I get a lot more informaiton, including e.g. the dictionaries
authoredBy and repository.
Exploring the code, i found this:
as_dict(self, keep_readonly=True, key_transformer=<function attribute_transformer at 0x7f8b1f4aa0d0>, **kwargs)
| Return a dict that can be JSONify using json.dump.
|
| Advanced usage might optionaly use a callback as parameter:
|
| .. code::python
|
| def my_key_transformer(key, attr_desc, value):
| return key
Probably I'm just having trouble parsing this information. Is this something I could use to achieve my purpose?
I'd like to know which pipelines are triggered form which repos, so that I can trace them back to the dev teams and create a report on this. If this is not possible with python, I might then need to use the CLI and a bash script, but that's not what I'd like the most.
Thanks
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con pipeline_client del Python SDK y su método as_dict; después, compara los datos de pipeline que devuelven con la salida de Azure CLI descrita en la issue. Determina si se exponen las relaciones authoredBy, repository y trigger; se considera terminado cuando se documente o implemente una forma clara de recuperar la información de repositorio a pipeline necesaria para el informe de gobernanza.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- azure, python
- Área
- api, devops
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 30/100