Skip to content

Commit 1a92761

Browse files
committed
handle manifest areas
Signed-off-by: Anas Nashif <[email protected]>
1 parent 47fe9ff commit 1a92761

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

scripts/set_assignees.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,24 @@ def process_pr(gh, maintainer_file, number):
144144
return
145145

146146
for changed_file in fn:
147+
147148
num_files += 1
148149
log(f"file: {changed_file.filename}")
149150

150151
areas = []
151152
if changed_file.filename in ['west.yml','submanifests/optional.yaml']:
152-
continue
153-
154-
areas = maintainer_file.path2areas(changed_file.filename)
153+
if args.areas and Path(args.areas).is_file():
154+
with open(args.areas, "r") as f:
155+
areas = json.load(f)
156+
for _area in areas:
157+
area_match = maintainer_file.name2areas(_area)
158+
if area_match:
159+
areas.extend(area_match)
160+
else:
161+
log(f"Manifest changes detected but no --areas file specified, skipping...")
162+
continue
163+
else:
164+
areas = maintainer_file.path2areas(changed_file.filename)
155165

156166
if not areas:
157167
continue

0 commit comments

Comments
 (0)