finetune repos

This commit is contained in:
2022-10-27 17:22:05 +02:00
parent 0f9f4cf295
commit a18ca7e2a4
4 changed files with 53 additions and 8 deletions

View File

@ -6,12 +6,20 @@ from ruamel.yaml import YAML
data = otc_metadata.services.Services()
new_data = data._service_data
services = data.service_dict
#services = data.service_dict
for srv in new_data["services"]:
srv["teams"] = [
{"name": f"docs-{srv['service_category']}-rw", "permission": "write"}
]
for doc in new_data["documents"]:
hc_location = None
if "type" in doc:
if doc["type"] == "api-ref":
hc_location = "api"
elif doc["type"] == "umn":
hc_location = "usermanual"
elif doc["type"] == "dev":
hc_location = "devg"
if hc_location:
hc_location += f"/{doc['service_type']}"
doc["hc_location"] = hc_location
_yaml = YAML()