microsoft / microsoft/azure-devops-python-api
PipelinesClient is missing model implementation for pipeline creation
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 684
- Fork
- 218
- Merge medio
- 8g 10h
- PR unite (30g)
- 1
Descrizione
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
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia in models.py, da CreatePipelineConfigurationParameters, e confronta i suoi campi attuali con l’esempio funzionante nell’issue. Verifica come viene rappresentato RepositoryReference e come questi modelli vengono serializzati per la creazione della pipeline. Il lavoro è completato quando il client può creare una pipeline utilizzando i valori di repository e percorso descritti nell’issue.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- azure, python
- Ambito
- api, devops
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100