openhands.resolver.interfaces.github
GithubIssueHandler Objects
class GithubIssueHandler(IssueHandlerInterface)
get_converted_issues
def get_converted_issues(issue_numbers: list[int] | None = None,
comment_id: int | None = None) -> list[Issue]
Download issues from Github.
Arguments:
issue_numbers
- The numbers of the issues to downloadcomment_id
- The ID of a single comment, if provided, otherwise all comments
Returns:
List of Github issues.
get_issue_comments
def get_issue_comments(issue_number: int,
comment_id: int | None = None) -> list[str] | None
Download comments for a specific issue from Github.
send_comment_msg
def send_comment_msg(issue_number: int, msg: str) -> None
Send a comment message to a GitHub issue or pull request.
Arguments:
issue_number
- The issue or pull request numbermsg
- The message content to post as a comment
GithubPRHandler Objects
class GithubPRHandler(GithubIssueHandler)
download_pr_metadata
def download_pr_metadata(
pull_number: int,
comment_id: int | None = None
) -> tuple[list[str], list[int], list[str], list[ReviewThread], list[str]]
Run a GraphQL query against the GitHub API for information.
Retrieves information about:
- unresolved review comments
- referenced issues the pull request would close
Arguments:
pull_number
- The number of the pull request to query.comment_id
- Optional ID of a specific comment to focus on.query
- The GraphQL query as a string.variables
- A dictionary of variables for the query.token
- Your GitHub personal access token.
Returns:
The JSON response from the GitHub API.
get_pr_comments
def get_pr_comments(pr_number: int,
comment_id: int | None = None) -> list[str] | None
Download comments for a specific pull request from Github.