Is there a way to get the same contents from the python sdk as from the az cli?
还没有人认领这个 Issue。
评估
调研方向
从 Python SDK 的 pipeline_client 及其 as_dict 方法开始,然后将它们返回的 pipeline 数据与 issue 中描述的 Azure CLI 输出进行比较。确定是否公开了 authoredBy、repository 和 trigger 关系;当记录或实现一种清晰的方式来获取治理报告所需的 repository-to-pipeline 信息时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- Python
- 星标
- 684
- 派生
- 218
- 平均合并
- 8 天 10 小时
- 30 天内合并 PR
- 1
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/azure-devops-python-api 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 55/100
-
难度 5/5 一周以上 新手友好度 25/100
-
难度 1/5 1 小时以内 新手友好度 55/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 3/5 1-2 天 新手友好度 45/100
查看 microsoft/azure-devops-python-api 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
qgis/QGIS-Documentation#11275 ·
-
bug priority:normal ready-for-dev
难度 2/5 1-3 小时 新手友好度 88/100
OpenHands/extensions#626 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 90/100
CSCfi/sd-search-api#39 ·
-
难度 1/5 1 小时以内 新手友好度 90/100
-
难度 2/5 1-3 小时 新手友好度 68/100
StevenBlack/hosts#3255 ·