Skip to content

Commit 6326cb2

Browse files
author
Silvia-Wachira
committed
update the branch_protections.yml file by adding a top-level EXEMPT_USERS section
1 parent 859918c commit 6326cb2

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

ccos/norm/branch_protections.yml

+15-5
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,26 @@ EXEMPT_REPOSITORIES:
99
- global-network-strategy
1010
# special purpose repo
1111
- network-platforms
12-
# exempted for bot pushes to default branch
13-
- quantifying:
14-
exempt_users:
15-
# - bot1
16-
# - bot2
1712
# special purpose repo
1813
- sre-wiki-js
1914
# special purpose repo
2015
- tech-support
2116

2217
REQUIRED_STATUS_CHECK_MAP:
18+
# Non-exempt repository requiring specific status checks
2319
creativecommons.github.io-source:
2420
- Build and Deploy CC Open Source
21+
22+
EXEMPT_USERS:
23+
quantifying:
24+
# List of users or bots that can bypass restrictions for this repository
25+
# Uncomment below to enable these users
26+
# - bot1
27+
# - bot2
28+
29+
# Other repositories and exempt users can be added below
30+
another-repo:
31+
# Specify exempt users for this repository
32+
# Uncomment and add users as needed
33+
# - bot3
34+
# - bot4

normalize_repos.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def update_branch_protection(repo):
111111
exempt_repositories = config["EXEMPT_REPOSITORIES"]
112112
required_status_check_map = config["REQUIRED_STATUS_CHECK_MAP"]
113113

114-
exempt_users = config.get("EXEMP_USERS", {}).get(repo.name, [])
114+
exempt_users = config.get("EXEMPT_USERS", {}).get(repo.name, [])
115115

116116
if repo.name not in exempt_repositories and is_engineering_project(repo):
117117
LOG.info(f"{repo.name}: updating branch protections")
@@ -143,6 +143,7 @@ def update_branch_protection(repo):
143143
def update_branches(args, repos):
144144
if args.skip_branches:
145145
return
146+
146147
LOG.info("Evaluting repositories for branch protections...")
147148
for repo in repos:
148149
update_branch_protection(repo)

0 commit comments

Comments
 (0)