def create_issue( self, title: str, body: str, private: Optional[bool] = None, labels: Optional[List[str]] = None, assignees: Optional[List[str]] = None, ) -> Issue: ids = [] for user in assignees or []: users_list = self.service.gitlab_instance.users.list(username=user) if not users_list: raise GitlabAPIException(f"Unable to find '{user}' username") ids.append(str(users_list[0].id)) return GitlabIssue.create( project=self, title=title, body=body, private=private, labels=labels, assignees=ids, )
def get_issue_list( self, status: IssueStatus = IssueStatus.open, author: Optional[str] = None, assignee: Optional[str] = None, ) -> List[Issue]: return GitlabIssue.get_list( project=self, status=status, author=author, assignee=assignee )
def create_issue( self, title: str, body: str, private: Optional[bool] = None, labels: Optional[List[str]] = None, ) -> Issue: return GitlabIssue.create( project=self, title=title, body=body, private=private, labels=labels )
def create_issue(self, title: str, description: str) -> Issue: return GitlabIssue.create(project=self, title=title, body=description)
def get_issue(self, issue_id: int) -> Issue: return GitlabIssue.get(project=self, id=issue_id)
def get_issue_list(self, status: IssueStatus = IssueStatus.open) -> List[Issue]: return GitlabIssue.get_list(project=self, status=status)