Merge remote-tracking branch 'origin/main'

This commit is contained in:
mrT23 2025-07-22 10:52:04 +03:00
commit a397ac1e63
No known key found for this signature in database
GPG key ID: D350490E39D5F5AD
2 changed files with 5 additions and 1 deletions

View file

@ -56,6 +56,8 @@ def filter_ignored(files, platform = 'github'):
files_o.append(f) files_o.append(f)
continue continue
files = files_o files = files_o
elif platform == 'bitbucket_server':
files = [f for f in files if f.get('path', {}).get('toString') and not r.match(f['path']['toString'])]
elif platform == 'gitlab': elif platform == 'gitlab':
# files = [f for f in files if (f['new_path'] and not r.match(f['new_path']))] # files = [f for f in files if (f['new_path'] and not r.match(f['new_path']))]
files_o = [] files_o = []

View file

@ -10,6 +10,7 @@ from requests.exceptions import HTTPError
import shlex import shlex
import subprocess import subprocess
from ..algo.file_filter import filter_ignored
from ..algo.git_patch_processing import decode_if_bytes from ..algo.git_patch_processing import decode_if_bytes
from ..algo.language_handler import is_valid_file from ..algo.language_handler import is_valid_file
from ..algo.types import EDIT_TYPE, FilePatchInfo from ..algo.types import EDIT_TYPE, FilePatchInfo
@ -244,7 +245,8 @@ class BitbucketServerProvider(GitProvider):
original_file_content_str = "" original_file_content_str = ""
new_file_content_str = "" new_file_content_str = ""
changes = self.bitbucket_client.get_pull_requests_changes(self.workspace_slug, self.repo_slug, self.pr_num) changes_original = list(self.bitbucket_client.get_pull_requests_changes(self.workspace_slug, self.repo_slug, self.pr_num))
changes = filter_ignored(changes_original, 'bitbucket_server')
for change in changes: for change in changes:
file_path = change['path']['toString'] file_path = change['path']['toString']
if not is_valid_file(file_path.split("/")[-1]): if not is_valid_file(file_path.split("/")[-1]):