예제 #1
0
    def _get_all_issue_comments(self, issue_id) -> List["IssueComment"]:
        issue = self.gitlab_repo.issues.get(issue_id)

        return [
            GitlabIssueComment(raw_comment)
            for raw_comment in issue.notes.list(sort="asc")
        ]
예제 #2
0
 def issue_comment(self, issue_id: int, body: str) -> IssueComment:
     """
     Create comment on an issue.
     """
     issue = self.gitlab_repo.issues.get(issue_id)
     comment = issue.notes.create({"body": body})
     return GitlabIssueComment(comment)
예제 #3
0
파일: issue.py 프로젝트: mmuzila/ogr
 def comment(self, body: str) -> IssueComment:
     comment = self._raw_issue.notes.create({"body": body})
     return GitlabIssueComment(parent=self, raw_comment=comment)
예제 #4
0
파일: issue.py 프로젝트: mmuzila/ogr
 def _get_all_comments(self) -> List[IssueComment]:
     return [
         GitlabIssueComment(parent=self, raw_comment=raw_comment)
         for raw_comment in self._raw_issue.notes.list(sort="asc", all=True)
     ]
예제 #5
0
파일: issue.py 프로젝트: packit/ogr
 def get_comment(self, comment_id: int) -> IssueComment:
     return GitlabIssueComment(self._raw_issue.notes.get(comment_id))