Merge pull request #31 from zion-networks/master

Added missing Team features
pull/32/head^2
Langenfeld 2024-08-22 16:17:25 +02:00 zatwierdzone przez GitHub
commit f061e5a584
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
2 zmienionych plików z 12 dodań i 2 usunięć

Wyświetl plik

@ -119,10 +119,10 @@ class Organization(ApiObject):
setattr(t, "_organization", self)
return teams
def get_team(self, name) -> "Team":
def get_team(self, name, ignore_case : bool = False) -> "Team":
teams = self.get_teams()
for team in teams:
if team.name == name:
if (not ignore_case and team.name == name) or (ignore_case and team.name.lower() == name.lower()):
return team
raise NotFoundException("Team not existent in organization.")

Wyświetl plik

@ -352,6 +352,15 @@ class Gitea:
"repo.releases",
"repo.ext_wiki",
),
units_map: Dict[str, str] = {
"repo.code": "none",
"repo.issues": "none",
"repo.ext_issues": "none",
"repo.wiki": "none",
"repo.pulls": "none",
"repo.releases": "none",
"repo.ext_wiki": "none",
},
):
"""Creates a Team.
@ -370,6 +379,7 @@ class Gitea:
"can_create_org_repo": can_create_org_repo,
"includes_all_repositories": includes_all_repositories,
"units": units,
"units_map": units_map,
},
)
if "id" in result: