def issue_comment(self, issue_id: int, body: str) -> IssueComment: """ Create comment on an issue. :param issue_id: int The ID of the issue :param body: str The text of the comment :return: IssueComment """ github_issue = self.__get_issue(number=issue_id) comment = github_issue.create_comment(body) return GithubIssueComment(comment)
def _get_all_issue_comments(self, issue_id: int) -> List[IssueComment]: issue = self.__get_issue(number=issue_id) return [ GithubIssueComment(raw_comment) for raw_comment in issue.get_comments() ]
def _get_all_comments(self) -> List[IssueComment]: return [ GithubIssueComment(parent=self, raw_comment=raw_comment) for raw_comment in self._raw_issue.get_comments() ]
def comment(self, body: str) -> IssueComment: comment = self._raw_issue.create_comment(body) return GithubIssueComment(parent=self, raw_comment=comment)
def get_comment(self, comment_id: int) -> IssueComment: return GithubIssueComment(self._raw_issue.get_comment(comment_id))