feat: Change the operation of transmitting file content during the QA process to transmitting file names instead.

This commit is contained in:
莘权 马 2023-11-23 22:41:44 +08:00
parent 13b37306cd
commit ec3dd004af
8 changed files with 159 additions and 151 deletions

View file

@ -160,7 +160,12 @@ class GitRepository:
:param relative_path: The relative path to the file repository within the Git repository.
:return: A new instance of FileRepository.
"""
return FileRepository(git_repo=self, relative_path=Path(relative_path))
path = Path(relative_path)
try:
path = path.relative_to(self.workdir)
except ValueError:
path = relative_path
return FileRepository(git_repo=self, relative_path=Path(path))
async def get_dependency(self) -> DependencyFile:
"""Get the dependency file associated with the Git repository.