mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-11 18:35:18 +00:00
Add validation for repository path
This commit is contained in:
parent
ea6e1811c1
commit
3b19827ae2
1 changed files with 2 additions and 0 deletions
|
|
@ -30,6 +30,8 @@ class LocalGitProvider(GitProvider):
|
|||
|
||||
def __init__(self, target_branch_name, incremental=False):
|
||||
self.repo_path = _find_repository_root()
|
||||
if self.repo_path is None:
|
||||
raise ValueError('Could not find repository root')
|
||||
self.repo = Repo(self.repo_path)
|
||||
self.head_branch_name = self.repo.head.ref.name
|
||||
self.target_branch_name = target_branch_name
|
||||
|
|
|
|||
Loading…
Reference in a new issue