microsoft / microsoft/azure-devops-python-api
PipelinesClient is missing model implementation for pipeline creation
Personne n'a encore pris cette issue.
- Langage dominant
- Python
- Étoiles
- 684
- Forks
- 218
- Merge moyen
- 8 j 10 h
- PR mergées (30 j)
- 1
Description
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
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez dans models.py, au niveau de CreatePipelineConfigurationParameters, et comparez ses champs actuels avec l’exemple fonctionnel de l’issue. Vérifiez comment RepositoryReference est représenté et comment ces modèles sont sérialisés pour la création d’un pipeline. C’est terminé lorsque le client peut créer un pipeline en utilisant les valeurs de dépôt et de chemin décrites dans l’issue.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- azure, python
- Domaine
- api, devops
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 48/100