Skip to content

Commit e6d6aac

Browse files
maass-hamburgkartben
authored andcommitted
ci: set_assignee: don't allways pick next area when submitter = assignee
we don't want to pick the next area when there are other maintainers available in the same area. Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
1 parent 4680590 commit e6d6aac

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scripts/set_assignees.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,13 @@ def process_pr(gh, maintainer_file, number):
136136
if pr.user.login in area.maintainers:
137137
# submitter = assignee, try to pick next area and
138138
# assign someone else other than the submitter
139-
continue
139+
# when there also other maintainers for the area
140+
# assign them
141+
if len(area.maintainers) > 1:
142+
assignees = area.maintainers.copy()
143+
assignees.remove(pr.user.login)
144+
else:
145+
continue
140146
else:
141147
assignees = area.maintainers
142148

0 commit comments

Comments
 (0)