예제 #1
0
파일: project.py 프로젝트: svenharris/ogr
    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)
예제 #2
0
파일: project.py 프로젝트: svenharris/ogr
 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()
     ]
예제 #3
0
 def _get_all_comments(self) -> List[IssueComment]:
     return [
         GithubIssueComment(parent=self, raw_comment=raw_comment)
         for raw_comment in self._raw_issue.get_comments()
     ]
예제 #4
0
 def comment(self, body: str) -> IssueComment:
     comment = self._raw_issue.create_comment(body)
     return GithubIssueComment(parent=self, raw_comment=comment)
예제 #5
0
 def get_comment(self, comment_id: int) -> IssueComment:
     return GithubIssueComment(self._raw_issue.get_comment(comment_id))