ci: do not add assignees if already set

If PR already has an assignee, do not add additional assignees to the
PR. Each PR should only have one assignee (in most cases)

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2022-06-16 11:25:52 -04:00
commit d63c2c44b5

View file

@ -170,7 +170,7 @@ def process_pr(gh, maintainer_file, number):
ms = []
# assignees
if maintainer != 'None':
if maintainer != 'None' and not pr.assignee:
try:
u = gh.get_user(maintainer)
ms.append(u)
@ -181,6 +181,8 @@ def process_pr(gh, maintainer_file, number):
log(f"Adding assignee {mm}...")
if not args.dry_run:
pr.add_to_assignees(mm)
else:
log("not setting assignee")
time.sleep(1)