review.bot.git_interface
#
Interface module for local GIT files.
Module Contents#
Classes#
Class to extract information from a diff in a local repository. |
Attributes#
- review.bot.git_interface.LOG#
- class review.bot.git_interface.LocalGit(repo_path: str)#
Class to extract information from a diff in a local repository.
- Parameters:
- repo_path
str
Path to the local repository.
- repo_path
- get_local_patch()#
Process the raw diff to extract the filename and useful info.
- Returns:
Dict
Dict with the file name as key and the diff as content.
- change_branch(branch_name: str)#
Switch the branch of the repo to the required one.
- Parameters:
- branch_name
str
Branch to switch to.
- branch_name
- get_file_sources()#
Get the text from the code files of the diff.
- Returns:
Dict
Dict with the file name as key and the source file as content.