@@ -282,6 +282,16 @@ def get_pull_requests(self, n: int = 0) -> list[dict[str, Any]]:
282282 """List pull requests in this repository."""
283283 return self ._extract_all (url = self ._url_pull , n = n )
284284
285+ def get_issues (self , state : str = "all" , n : int = 0 ) -> list [dict [str , Any ]]:
286+ """List issues in this repository.
287+
288+ :param state: Filter issues by state: ``open``, ``closed``, or ``all``
289+ (the default). Note that GitHub's issues endpoint also returns pull
290+ requests; each pull request carries a ``pull_request`` key.
291+ :param n: The maximum number of issues to return (0 means all).
292+ """
293+ return self ._extract_all (url = self ._url_issues , params = {"state" : state }, n = n )
294+
285295 def _generate_pull_request_content (
286296 self , base : str , head : str , model : str
287297 ) -> tuple [str , str ] | None :
@@ -499,6 +509,14 @@ def pr_has_rust_change(
499509 """
500510 return self .pr_has_change (pr_number = pr_number , pred = pred )
501511
512+ def get_issue_comments (self , issue_number : int , n : int = 0 ) -> list [dict [str , Any ]]:
513+ """List comments on an issue in this repository.
514+
515+ :param issue_number: The number of the issue.
516+ :param n: The maximum number of comments to return (0 means all).
517+ """
518+ return self ._extract_all (url = f"{ self ._url_issues } /{ issue_number } /comments" , n = n )
519+
502520 def create_issue_comment (self , issue_number : int , body : str ) -> dict [str , Any ]:
503521 """Add a new comment to an issue.
504522
0 commit comments