Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions compare/commands/compare/interactors/fetch_impacted_files.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import enum
from typing import List, Optional

from shared.utils.match import match
from shared.utils.match import Matcher

import services.components as components
from codecov.commands.base import BaseInteractor
Expand Down Expand Up @@ -74,11 +74,8 @@ def _apply_filters(
res = impacted_files

if components_paths:
res = [
file
for file in impacted_files
if match(components_paths, file.head_name)
]
matcher = Matcher(components_paths)
res = [file for file in impacted_files if matcher.match(file.head_name)]
return res

def get_attribute(
Expand Down
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ freezegun
google-cloud-pubsub
gunicorn>=22.0.0
https://github.com/codecov/opentelem-python/archive/refs/tags/v0.0.4a1.tar.gz#egg=codecovopentelem
https://github.com/codecov/shared/archive/016a756f2ab982016bc2d46e2467be71604c0ba5.tar.gz#egg=shared
https://github.com/codecov/shared/archive/3aea532ed80c4d941cbc50e27b11147a8f72d3cd.tar.gz#egg=shared
https://github.com/photocrowd/django-cursor-pagination/archive/f560902696b0c8509e4d95c10ba0d62700181d84.tar.gz
idna>=3.7
minio
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ sentry-sdk[celery]==2.13.0
# shared
setproctitle==1.1.10
# via -r requirements.in
shared @ https://github.com/codecov/shared/archive/016a756f2ab982016bc2d46e2467be71604c0ba5.tar.gz
shared @ https://github.com/codecov/shared/archive/3aea532ed80c4d941cbc50e27b11147a8f72d3cd.tar.gz
# via -r requirements.in
simplejson==3.17.2
# via -r requirements.in
Expand Down
5 changes: 3 additions & 2 deletions services/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from shared.reports.resources import Report
from shared.reports.types import ReportTotals
from shared.torngit.exceptions import TorngitClientError
from shared.utils.match import match
from shared.utils.match import Matcher

import services.report as report_service
from codecov_auth.models import Owner
Expand Down Expand Up @@ -195,7 +195,8 @@ def files(self) -> list[str]:

# Do path filtering if needed
if self.filter_paths:
files = [file for file in files if match(self.filter_paths, file)]
matcher = Matcher(self.filter_paths)
files = [file for file in files if matcher.match(file)]

return files

Expand Down
Loading