From 16141bb0e8361b71fe6a0fb1c3bd7056d15e8e87 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Thu, 16 May 2024 16:35:00 -0500 Subject: [PATCH] Fix checking maintainers for teams --- conda_smithy/lint_recipe.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/conda_smithy/lint_recipe.py b/conda_smithy/lint_recipe.py index 7d4959ee5..f48f9f225 100644 --- a/conda_smithy/lint_recipe.py +++ b/conda_smithy/lint_recipe.py @@ -1181,8 +1181,24 @@ def run_conda_forge_specific(meta, recipe_dir, lints, hints): # Check if all maintainers have either commented or are the PR author non_participating_maintainers = set() for maintainer in maintainers: - if maintainer not in commenters and maintainer != pr_author: + if "/" in maintainer: + team_org, team_name = maintainer.split("/") + if team_org == "conda-forge": + team_maintainers = list( + gh.get_organization(team_org) + .get_team_by_slug(team_name) + .get_members() + ) + if any( + team_maintainer in commenters + or team_maintainer == pr_author + for team_maintainer in team_maintainers + ): + continue non_participating_maintainers.add(maintainer) + else: + if maintainer not in commenters and maintainer != pr_author: + non_participating_maintainers.add(maintainer) # Add a lint message if there are any non-participating maintainers if non_participating_maintainers: