Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Is there a way to get the same contents from the python sdk as from the az cli?

Offen
#403 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
30/100
Issue-Typ
Feature
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Tech-Stack
azure, python
Bereich
api, devops

Rechercherichtung

Beginne mit dem Python SDK's pipeline_client und seiner as_dict-Methode und vergleiche anschließend die von ihnen zurückgegebenen Pipeline-Daten mit der in der Issue beschriebenen Azure CLI-Ausgabe. Bestimme, ob authoredBy-, repository- und trigger-Beziehungen offengelegt werden; die Aufgabe ist abgeschlossen, wenn eine klare Möglichkeit dokumentiert oder implementiert ist, die für den Governance-Bericht benötigten Repository-zu-Pipeline-Informationen abzurufen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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

Vorherrschende Sprache
Python
Sterne
684
Forks
218
Ø Merge
8 T. 10 Std.
Gemergte PRs (30 T.)
1

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus microsoft/azure-devops-python-api

Alle Issues in microsoft/azure-devops-python-api

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.