diff_files

This commit is contained in:
mrT23
2023-07-13 18:26:35 +03:00
parent 4b4fda37a6
commit 4e59693c76
3 changed files with 10 additions and 7 deletions

View File

@ -24,10 +24,10 @@ def get_pr_diff(git_provider: Union[GithubProvider, Any], token_handler: TokenHa
Returns a string with the diff of the PR.
If needed, apply diff minimization techniques to reduce the number of tokens
"""
git_provider.pr.files = list(git_provider.get_diff_files())
git_provider.pr.diff_files = list(git_provider.get_diff_files())
# get pr languages
pr_languages = sort_files_by_main_languages(git_provider.get_languages(), git_provider.pr.files)
pr_languages = sort_files_by_main_languages(git_provider.get_languages(), git_provider.pr.diff_files)
# generate a standard diff string, with patch extension
patches_extended, total_tokens = pr_generate_extended_diff(pr_languages, token_handler)