GithubToolkit
- access_token (str, optional): The access token to authenticate with GitHub. If not provided, it will be obtained using the
get_github_access_token
method.
init
- repo_name (str): The name of the GitHub repository.
- access_token (str, optional): The access token to authenticate with GitHub. If not provided, it will be obtained using the
get_github_access_token
method.
get_github_access_token
github_create_pull_request
- repo_name (str): The name of the GitHub repository.
- file_path (str): The path of the file to be updated in the repository.
- new_content (str): The specified new content of the specified file.
- pr_title (str): The title of the issue that is solved by this pull request.
- body (str): The commit message for the pull request.
- branch_name (str): The name of the branch to create and submit the pull request from.
github_get_issue_list
- repo_name (str): The name of the GitHub repository.
- state (
Literal["open", "closed", "all"]
): The state of pull requests to retrieve. (default: :obj:all
) Options are: - “open”: Retrieve only open pull requests. - “closed”: Retrieve only closed pull requests. - “all”: Retrieve all pull requests, regardless of state.
github_get_issue_content
- repo_name (str): The name of the GitHub repository.
- issue_number (int): The number of the issue to retrieve.
github_get_pull_request_list
- repo_name (str): The name of the GitHub repository.
- state (
Literal["open", "closed", "all"]
): The state of pull requests to retrieve. (default: :obj:all
) Options are: - “open”: Retrieve only open pull requests. - “closed”: Retrieve only closed pull requests. - “all”: Retrieve all pull requests, regardless of state.
github_get_pull_request_code
- repo_name (str): The name of the GitHub repository.
- pr_number (int): The number of the pull request to retrieve.
github_get_pull_request_comments
- repo_name (str): The name of the GitHub repository.
- pr_number (int): The number of the pull request to retrieve.
github_get_all_file_paths
- repo_name (str): The name of the GitHub repository.
- path (str): The repository path to start the traversal from. empty string means starts from the root directory. (default: :obj:
""
)
github_retrieve_file_content
- repo_name (str): The name of the GitHub repository.
- file_path (str): The path of the file to retrieve.