finetune repos
This commit is contained in:
@ -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()
|
||||
|
Reference in New Issue
Block a user