From bdf78980d5ac195e3c87259b04446cc9c8b47bf9 Mon Sep 17 00:00:00 2001 From: Noor Date: Sat, 28 Nov 2020 17:20:09 -0800 Subject: [PATCH] Revert "feat: grant team lead maintainer permissions on team create (#595)" This reverts commit 3ea85c2a4a7e3c527477570ece004e45d07f9e6f. --- app/controller/command/commands/team.py | 5 ++--- interface/github.py | 7 ------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/app/controller/command/commands/team.py b/app/controller/command/commands/team.py index c4f8c5be..6bb447e4 100644 --- a/app/controller/command/commands/team.py +++ b/app/controller/command/commands/team.py @@ -370,13 +370,12 @@ def create_helper(self, param_list, user_id) -> ResponseTuple: self.gh.add_team_member(command_user.github_username, team_id) team.add_member(command_user.github_id) if param_list["lead"] is not None: - msg += "added lead as a maintainer" + msg += "added lead" lead_user = self.facade.retrieve(User, param_list["lead"]) team.add_team_lead(lead_user.github_id) if not self.gh.has_team_member(lead_user.github_username, team_id): - self.gh.add_team_maintainer( - lead_user.github_username, team_id) + self.gh.add_team_member(lead_user.github_username, team_id) else: team.add_team_lead(command_user.github_id) diff --git a/interface/github.py b/interface/github.py index 7c0ffada..a2d0ae2e 100644 --- a/interface/github.py +++ b/interface/github.py @@ -206,10 +206,3 @@ def remove_team_member(self, username: str, team_id: str): team = self.org.get_team(int(team_id)) to_be_removed_member = cast(NamedUser, self.github.get_user(username)) team.remove_membership(to_be_removed_member) - - @handle_github_error - def add_team_maintainer(self, username: str, team_id: str): - """Add maintainer with given username to team with id team_id.""" - team = self.org.get_team(int(team_id)) - to_be_maintainer = cast(NamedUser, self.github.get_user(username)) - team.add_membership(to_be_maintainer, 'maintainer')