From 79fa7461c536fdae563e46206a6c965b54fb9a7c Mon Sep 17 00:00:00 2001 From: Luca Giorgi Date: Thu, 20 Mar 2025 15:21:02 +0100 Subject: [PATCH] implement org/team logic --- .github/workflows/scripts/pr_workflow.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/scripts/pr_workflow.py b/.github/workflows/scripts/pr_workflow.py index 7fca89c97..9accabe99 100644 --- a/.github/workflows/scripts/pr_workflow.py +++ b/.github/workflows/scripts/pr_workflow.py @@ -100,14 +100,14 @@ def __init__(self) -> None: self.verify_labeler_config() def get_allowed_users(self) -> list[str]: - # org: github.Organization = self.gh_client.get_organization("opendatahub-io") - # # slug is the team name with replaced special characters, - # # all words to lowercase and spaces replace with a - - # team: github.Team = org.get_team_by_slug("opendatahub-tests-contributors") - # members: PaginatedList[github.NamedUser] = team.get_members() - # users = [m.login for member in members] + org: github.Organization = self.gh_client.get_organization("opendatahub-io") + # slug is the team name with replaced special characters, + # all words to lowercase and spaces replace with a - + team: github.Team = org.get_team_by_slug("opendatahub-tests-contributors") + members: PaginatedList[github.NamedUser] = team.get_members() + users = [m.login for member in members] # TODO: replace once bot user is part of the org and team - users = ["lugi0", "rnetser", "adolfo-ab", "tarukumar", "dbasunag", "mwaykole"] + # users = ["lugi0", "rnetser", "adolfo-ab", "tarukumar", "dbasunag", "mwaykole"] return users def verify_allowed_user(self) -> None: