From 0e3dbbd0f2633e833f88cc6f51a1a6d1ebcfffb2 Mon Sep 17 00:00:00 2001 From: mrT23 Date: Thu, 3 Aug 2023 22:51:38 +0300 Subject: [PATCH] fix major bug in gitlab --- pr_agent/git_providers/gitlab_provider.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pr_agent/git_providers/gitlab_provider.py b/pr_agent/git_providers/gitlab_provider.py index 36d3bbcc..d28d59b8 100644 --- a/pr_agent/git_providers/gitlab_provider.py +++ b/pr_agent/git_providers/gitlab_provider.py @@ -83,8 +83,10 @@ class GitLabProvider(GitProvider): diff_files = [] for diff in diffs: if is_valid_file(diff['new_path']): - original_file_content_str = self._get_pr_file_content(diff['old_path'], self.mr.target_branch) - new_file_content_str = self._get_pr_file_content(diff['new_path'], self.mr.source_branch) + # original_file_content_str = self._get_pr_file_content(diff['old_path'], self.mr.target_branch) + # new_file_content_str = self._get_pr_file_content(diff['new_path'], self.mr.source_branch) + original_file_content_str = self._get_pr_file_content(diff['old_path'], self.mr.diff_refs['base_sha']) + new_file_content_str = self._get_pr_file_content(diff['new_path'], self.mr.diff_refs['head_sha']) try: if isinstance(original_file_content_str, bytes):