Skip to content
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
250 changes: 183 additions & 67 deletions .github/workflows/build.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scripts/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ where = src
console_scripts =
chart-repo-manager = chartrepomanager.chartrepomanager:main
chart-pr-review = chartprreview.chartprreview:main
check-pr-content = checkprcontent.checkpr:main
validate-submission = submission.validate:main
pr-artifact = pullrequest.prartifact:main
pr-comment = pullrequest.prepare_pr_comment:main
sa-for-chart-testing = saforcharttesting.saforcharttesting:main
Expand Down
Empty file.
311 changes: 0 additions & 311 deletions scripts/src/checkprcontent/checkpr.py

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/src/metrics/pushowners.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def getFileContent(changed_file):
try:
owner_data = owners_file.get_owner_data_from_file(changed_file)
except owners_file.OwnersFileError as e:
print("Exception loading OWNERS file: {e}")
print(f"Exception loading OWNERS file: {e}")
return "", "", "", "", ""

users_included = owners_file.get_users_included(owner_data)
Expand Down
28 changes: 2 additions & 26 deletions scripts/src/pullrequest/prartifact.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import argparse
import os
import pathlib
import shutil
import sys

import requests

sys.path.append("../")
from checkprcontent import checkpr
from reporegex import matchers
from tools import gitutils

pr_files = []
Expand All @@ -19,7 +17,7 @@
# TODO(baijum): Move this code under chartsubmission.chart module
def get_modified_charts(api_url):
files = get_modified_files(api_url)
pattern, _, _ = checkpr.get_file_match_compiled_patterns()
pattern, _, _ = matchers.get_file_match_compiled_patterns()
for file in files:
match = pattern.match(file)
if match:
Expand Down Expand Up @@ -95,24 +93,6 @@ def get_labels(api_url):
return pr_labels


def save_metadata(directory, vendor_label, chart, number):
with open(os.path.join(directory, "vendor"), "w") as fd:
print(f"add {directory}/vendor as {vendor_label}")
fd.write(vendor_label)

with open(os.path.join(directory, "chart"), "w") as fd:
print(f"add {directory}/chart as {chart}")
fd.write(chart)

with open(os.path.join(directory, "NR"), "w") as fd:
fd.write(number)

if os.path.exists("report.yaml"):
shutil.copy("report.yaml", directory)
else:
pathlib.Path(os.path.join(directory, "report.yaml")).touch()


def main():
parser = argparse.ArgumentParser()
parser.add_argument(
Expand Down Expand Up @@ -148,10 +128,6 @@ def main():
pr_files = get_modified_files(args.api_url)
print(f"[INFO] files in pr: {pr_files}")
gitutils.add_output("pr_files", pr_files)
else:
os.makedirs(args.directory, exist_ok=True)
category, organization, chart, version = get_modified_charts(args.api_url)
save_metadata(args.directory, organization, chart, args.number)


if __name__ == "__main__":
Expand Down
Loading
Loading