Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure more locations to use the submission regex matchers #277

Merged
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
5 changes: 4 additions & 1 deletion scripts/src/chartprreview/chartprreview.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from report import verifier_report
from signedchart import signedchart
from pullrequest import prartifact
from reporegex import matchers
from tools import gitutils


Expand Down Expand Up @@ -58,7 +59,9 @@ def get_modified_charts(directory, api_url):
"""
print("[INFO] Get modified charts. %s" % directory)
files = prartifact.get_modified_files(api_url)
pattern = re.compile(r"charts/(\w+)/([\w-]+)/([\w-]+)/([\w\.\-+]+)/.*")
pattern = re.compile(
matchers.submission_path_matcher(strict_categories=False) + r"/.*"
)
for file_path in files:
m = pattern.match(file_path)
if m:
Expand Down
5 changes: 4 additions & 1 deletion scripts/src/chartrepomanager/chartrepomanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@
from chartrepomanager import indexannotations
from signedchart import signedchart
from pullrequest import prartifact
from reporegex import matchers
from tools import gitutils


def get_modified_charts(api_url):
files = prartifact.get_modified_files(api_url)
pattern = re.compile(r"charts/(\w+)/([\w-]+)/([\w-]+)/([\w\.-]+)/.*")
pattern = re.compile(
matchers.submission_path_matcher(strict_categories=False) + r"/.*"
)
for file_path in files:
m = pattern.match(file_path)
if m:
Expand Down
5 changes: 4 additions & 1 deletion scripts/src/metrics/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@
from indexfile import index
from pullrequest import prepare_pr_comment as pr_comment
from collections import OrderedDict
from reporegex import matchers

file_pattern = re.compile(r"charts/([\w-]+)/([\w-]+)/([\w\.-]+)/([\w\.-]+)/.*")
file_pattern = re.compile(
matchers.submission_path_matcher(strict_categories=False) + r"/.*"
)
chart_downloads_event = "Chart Downloads v1.0"
ignore_users = [
"zonggen",
Expand Down
Loading