Skip to content

Commit

Permalink
add reason to support wider boycott list
Browse files Browse the repository at this point in the history
change validation script to validate all in PR before exiting
  • Loading branch information
thm committed Jan 28, 2024
1 parent c55b46e commit 13484f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions schemas/brand_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ properties:
enum:
- operations_in_israel
- operations_in_settlements
- other
countries:
description: |-
A list of countries (ISO alpha-2 country codes) that the brand operates in.
Expand Down
7 changes: 6 additions & 1 deletion scripts/validate_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,14 @@ def main():
company_schema = load_yaml(os.path.join(root_path, "schemas/company_schema.yaml"))
company_files = glob.glob(os.path.join(root_path, "data/companies/") + "*.yaml")
print("Validating", len(company_files), "companies")
failed = False
for file in company_files:
if not validate_with_schema(file, company_schema):
exit(1)
failed = True

if failed:
exit(1)

print("All companies are valid.")


Expand Down

0 comments on commit 13484f4

Please sign in to comment.