smaller fixes to gitcontrol management

This commit is contained in:
Artem Goncharov 2022-09-07 12:08:32 +02:00
parent c41baffa04
commit a7d698e705
2 changed files with 4 additions and 7 deletions

View File

@ -808,7 +808,7 @@ services:
service_title: Anti DDoS
service_type: antiddos
teams:
- name: docs-security-rw
- name: docs-security-services-rw
permission: write
- repositories:
- environment: internal

View File

@ -34,7 +34,7 @@ def process_services(args, services):
block_on_rejected_reviews=True,
dismiss_stale_approvals=True,
enable_push=False,
enable_status_check_contexts=["gl/check"],
status_check_contexts=["gl/check"],
enable_merge_whitelist=True,
merge_whitelist_usernames=["zuul"]
)
@ -65,7 +65,7 @@ def process_services(args, services):
continue
if repo["type"] == 'gitea':
teams = [{"name": "docs-infra-team", "permission": "write"}]
teams = []
branch_protections_main = copy.deepcopy(gitea_bp)
if "teams" in repo:
teams_def = repo["teams"]
@ -75,10 +75,7 @@ def process_services(args, services):
for team in teams_def:
branch_protections_main["approvals_whitelist_teams"].append(
team["name"])
teams.append(dict(
name=team["name"],
permission=team["permission"]
))
teams.append(team["name"])
data = copy.deepcopy(gitea_repo_template)
data["description"] = (
f"Open Telekom Cloud {service['service_title']} "