scripts: set_maintainer: fix author == maintainer fallback logic

The "Submitter is same as Assignee" is comparing strings to <Area> and
always failing the condition, fix it by dropping the ".name".

Tested with ./scripts/set_assignees.py -v -y -P 67526 (now falls back to
the other maintainer as it should).

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit is contained in:
Fabio Baltieri 2024-01-16 11:52:11 +00:00 committed by Anas Nashif
commit 49e8e11a77

View file

@ -146,7 +146,7 @@ def process_pr(gh, maintainer_file, number):
log("Submitter is same as Assignee, trying to find another assignee...") log("Submitter is same as Assignee, trying to find another assignee...")
aff = list(area_counter.keys())[0] aff = list(area_counter.keys())[0]
for area in all_areas: for area in all_areas:
if area.name == aff: if area == aff:
if len(area.maintainers) > 1: if len(area.maintainers) > 1:
assignee = area.maintainers[1] assignee = area.maintainers[1]
else: else: