mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-03 04:10:49 +08:00
Add file ignore functionality and update documentation for ignore patterns
This commit is contained in:
@ -28,11 +28,11 @@ def filter_ignored(files):
|
||||
pass
|
||||
|
||||
# keep filenames that _don't_ match the ignore regex
|
||||
if files:
|
||||
if files and isinstance(files, list):
|
||||
if hasattr(files[0], 'filename'): # github
|
||||
for r in compiled_patterns:
|
||||
files = [f for f in files if (f.filename and not r.match(f.filename))]
|
||||
elif 'new_path' in files[0]: # gitlab
|
||||
elif isinstance(files[0], dict) and 'new_path' in files[0]: # gitlab
|
||||
for r in compiled_patterns:
|
||||
files = [f for f in files if (f['new_path'] and not r.match(f['new_path']))]
|
||||
|
||||
|
Reference in New Issue
Block a user