microsoft / microsoft/azure-devops-python-api
PipelinesClient is missing model implementation for pipeline creation
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
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
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 en models.py, en CreatePipelineConfigurationParameters, y compara sus campos actuales con el ejemplo funcional del issue. Comprueba cómo se representa RepositoryReference y cómo se serializan estos modelos para la creación de pipelines. Se considera terminado cuando el cliente puede crear un pipeline usando los valores de repositorio y ruta descritos en el issue.
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
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 48/100