示例#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))