Host labels information (#743)

### Summary

This PR adds the labels information to the JSON we host for the new
ecosystem page. It also changes the name of the file accordingly.
This commit is contained in:
Frank Harkins 2024-07-03 20:32:52 +01:00 committed by GitHub
parent ac7acc5c40
commit 4ae8c3ac55
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 3 deletions

2
.gitignore vendored
View File

@ -141,4 +141,4 @@ dmypy.json
# Generated files
/website/index.html
/website/style.css
/website/members-data.json
/website/ecosystem.json

View File

@ -107,5 +107,8 @@ class CliMembers:
def compile_json(self, output_file: str):
"""Compile JSON file for consumption by ibm.com"""
data = {"members": [repo.to_dict() for repo in self.dao.get_all()]}
data = {
"members": [repo.to_dict() for repo in self.dao.get_all()],
"labels": json.loads(Path(self.resources_dir, "labels.json").read_text()),
}
Path(output_file).write_text(json.dumps(data))

View File

@ -39,4 +39,4 @@ allowlist_externals = bash
basepython = python3
commands =
bash -ec "python manager.py build --resources ecosystem/resources --output website/index.html"
bash -ec "python manager.py members compile_json 'website/members-data.json'"
bash -ec "python manager.py members compile_json 'website/ecosystem.json'"