microsoft / microsoft/azure-devops-python-api

PipelinesClient is missing model implementation for pipeline creation

Đang mở
#432 0 bình luận 8 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
Python
Star
684
Fork
218
Merge trung bình
8 ngày 10 giờ
Pull request đã merge (30 ngày)
1

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu trong models.py tại CreatePipelineConfigurationParameters và so sánh các trường hiện tại của nó với ví dụ đang hoạt động trong issue. Kiểm tra cách RepositoryReference được biểu diễn và cách các model này được tuần tự hóa để tạo pipeline. Công việc được xem là hoàn tất khi client có thể tạo một pipeline bằng các giá trị repository và path được mô tả trong issue.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
azure, python
Lĩnh vực
api, devops
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
48/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.