You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lists all open pull requests for a given GitHub repository owner.
221
+
Lists all open pull requests or issues for a given GitHub repository owner.
222
222
Args:
223
223
repo_owner (str): The owner of the GitHub repository.
224
+
issue (str): The type of items to list, either 'pr' for pull requests or 'issue' for issues.
224
225
Returns:
225
-
str: A message indicating the result of the PR listing. Returns a success message with the list of open PRs if successful, or an error message if an exception occurs.
226
+
str: A message indicating the result of the listing. Returns a success message with the list of open pull requests or issues if successful, or an error message if an exception occurs.
226
227
Error Handling:
227
-
Catches and logs any exceptions that occur during the PR listing process. If an error is encountered, the error message is logged and returned.
228
+
Catches and logs any exceptions that occur during the listing process. If an error is encountered, the error message is logged and returned.
228
229
"""
229
-
logging.info(f"Listing open PRs for {repo_owner}")
230
+
logging.info(f"Listing open {issue} for {repo_owner}")
230
231
try:
231
-
open_prs=self.gi.list_open_prs(repo_owner)
232
-
returnf"Successfully listed open PRs for {repo_owner}: {open_prs}"
0 commit comments