3 @qhci@sddlmZddlmZddlmZddlmZmZmZm Z ddl m Z m Z m Z ddlmZmZmZmZddlmZmZmZd d d d gZGd d d e e eZGdd d e eZGdd d e e eZGdd d e eZdS))cli) exceptions)types)RequiredOptional RESTManager RESTObjectRESTObjectList) CRUDMixinObjectDeleteMixin SaveMixin) GroupIssueGroupIssueManager ProjectIssueProjectIssueManager)GroupMergeRequestProjectMergeRequestProjectMergeRequestManagerGroupMilestoneGroupMilestoneManagerProjectMilestoneProjectMilestoneManagerc@sLeZdZdZejdejejddZ ejdejejddZ dS)rtitlecKsNd|jj|jf}|jjj|fddi|}t|jj|jjd}t|t|S)aList issues related to this milestone. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) as_list (bool): If set to False and no pagination option is defined, return a generator instead of a list **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabListError: If the list could not be retrieved Returns: RESTObjectList: The list of issues z %s/%s/issuesas_listF)parent) managerpathget_idgitlab http_listr_parentrr )selfkwargsr data_listrr$[/home/ec2-user/environment/venv/lib/python3.6/dist-packages/gitlab/v4/objects/milestones.pyissuesszGroupMilestone.issuescKsNd|jj|jf}|jjj|fddi|}t|jj|jjd}t|t|S)aList the merge requests related to this milestone. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) as_list (bool): If set to False and no pagination option is defined, return a generator instead of a list **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabListError: If the list could not be retrieved Returns: RESTObjectList: The list of merge requests z%s/%s/merge_requestsrF)r) rrrrrrr rr)r!r"rr#rr$r$r%merge_requests4szGroupMilestone.merge_requestsN) __name__ __module__ __qualname___short_print_attrrregister_custom_actionexc on_http_errorGitlabListErrorr&r'r$r$r$r%rs c@s@eZdZdZeZddiZedddZedd Z dZ d e j iZ dS)rz/groups/%(group_id)s/milestonesZgroup_ididr descriptiondue_date start_date)requiredoptional state_event)r5iidsstatesearchN)r)r1r2r3)rr1r2r3r6)r7r8r9)r(r)r*_pathr_obj_cls_from_parent_attrsr _create_attrs _update_attrs _list_filtersr ListAttribute_typesr$r$r$r%rOs c@sLeZdZdZejdejejddZ ejdejejddZ dS)rrcKsNd|jj|jf}|jjj|fddi|}t|jj|jjd}t|t|S)aList issues related to this milestone. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) as_list (bool): If set to False and no pagination option is defined, return a generator instead of a list **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabListError: If the list could not be retrieved Returns: RESTObjectList: The list of issues z %s/%s/issuesrF)r) rrrrrrr rr)r!r"rr#rr$r$r%r&`szProjectMilestone.issuescKsNd|jj|jf}|jjj|fddi|}t|jj|jjd}t|t|S)aList the merge requests related to this milestone. Args: all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) as_list (bool): If set to False and no pagination option is defined, return a generator instead of a list **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabListError: If the list could not be retrieved Returns: RESTObjectList: The list of merge requests z%s/%s/merge_requestsrF)r) rrrrrrr rr)r!r"rr#rr$r$r%r'{s zProjectMilestone.merge_requestsN) r(r)r*r+rr,r-r.r/r&r'r$r$r$r%r]s c@s@eZdZdZeZddiZeddd Zedd Z dZ d e j iZ dS)rz#/projects/%(project_id)s/milestonesZ project_idr0rr1r2r3r6)r4r5)r5r7r8r9N)r)r1r2r3r6)rr1r2r3r6)r7r8r9)r(r)r*r:rr;r<rr=r>r?rr@rAr$r$r$r%rsN)rrrr-rZ gitlab.baserrrrZ gitlab.mixinsr r r r&r rrrr'rrr__all__rrrrr$r$r$r%s   9;