From b6826c3637e56e2d718aae10c375203be655ccd6 Mon Sep 17 00:00:00 2001 From: Carly Gundy <47304080+cgundy@users.noreply.github.com> Date: Tue, 3 Dec 2024 11:34:12 +0100 Subject: [PATCH] Update check_membership.py --- reusable_workflows/check_membership/check_membership.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/reusable_workflows/check_membership/check_membership.py b/reusable_workflows/check_membership/check_membership.py index 9582741..6b9849e 100644 --- a/reusable_workflows/check_membership/check_membership.py +++ b/reusable_workflows/check_membership/check_membership.py @@ -27,14 +27,15 @@ def is_member_of_org(gh: github3.login, org: str, user: str) -> bool: return gh.organization(org).is_member(user) -def is_approved_member(): - if is_member_of_org(): +def is_approved_member(gh: github3.login, org: str, user: str): + if is_member_of_org(gh, org, user): print(f"{user} is member of {org} and can contribute.") return True - if is_approved_bot(): + if is_approved_bot(user): print(f"{user} is an approved bot and can contribute.") return True - return False + else: + return False def main() -> None: