microsoft / microsoft/azure-devops-python-api
PipelinesClient is missing model implementation for pipeline creation
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 684
- 派生
- 218
- 平均合并
- 8 天 10 小时
- 30 天内合并 PR
- 1
描述
Hi,
i tried to create a build pipeline with the azure.devops.v6_0.pipelines.PipelinesClient and noticed that this is currently not possible because of a missing model definition within the CreatePipelineConfigurationParameters. This object currently only has a type attribute but it also needs (at least) a repository and a path attribute to refer the corresponding repository.
Attached you'll find a minimal working example for my case. I don't know which fields might be missing in addition to get it working in general.
I found my solution in this blog post and I'll move to a simple requests call for this case until it is fixed.
class CreatePipelineConfigurationParameters(Model):
"""
Configuration parameters of the pipeline.
:param type: Type of configuration.
:type type: object
"""
_attribute_map = {
'path': {'key': 'path', 'type': 'object'},
'repository': {'key': 'repository', 'type': 'RepositoryReference'}, # currently missing
'type': {'key': 'type', 'type': 'object'}, # currently missing
}
def __init__(self, path=None, repository=None, type=None):
super(CreatePipelineConfigurationParameters, self).__init__()
self.path = path
self.repository = repository # currently missing
self.type = type # currently missing
# currently missing, added as minimal working sample
class RepositoryReference(Model):
_attribute_map = {
'id': {'key': 'id', 'type': 'object'},
'type': {'key': 'type', 'type': 'object'}
}
def __init__(self, id=None, type=None):
self.id = id
self.type = type
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 models.py 中的 CreatePipelineConfigurationParameters 开始,将其当前字段与 issue 中可正常工作的示例进行比较。检查 RepositoryReference 的表示方式,以及这些模型如何为创建 pipeline 进行序列化。当客户端可以使用 issue 中描述的 repository 和 path 值创建 pipeline 时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- azure, python
- 领域
- api, devops
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100