microsoft / microsoft/azure-devops-python-api

PipelinesClient is missing model implementation for pipeline creation

Aberta
#432 0 comentários 8 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Linguagem predominante
Python
Estrelas
684
Forks
218
Merge médio
8d 10h
PRs com merge (30d)
1

Descrição

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

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Direção de pesquisa

Comece em models.py, em CreatePipelineConfigurationParameters, e compare seus campos atuais com o exemplo funcional na issue. Verifique como RepositoryReference é representado e como esses modelos são serializados para a criação de um pipeline. O trabalho estará concluído quando o cliente puder criar um pipeline usando os valores de repositório e caminho descritos na issue.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
azure, python
Domínio
api, devops
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
48/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.