:calls: `POST /orgs/{org}/teams `_ :param name: string :param repo_names: list of :class:`github.Repository.Repository` :param permission: string :param privacy: string :param description: st
(
self,
name: str,
repo_names: Opt[list[Repository]] = NotSet,
permission: Opt[str] = NotSet,
privacy: Opt[str] = NotSet,
description: Opt[str] = NotSet,
parent_team_id: Opt[int] = NotSet,
maintainers: Opt[list[str]] = NotSet,
notification_setting: Opt[str] = NotSet,
)
| 973 | return github.OrganizationSecret.OrganizationSecret(self._requester, url=url) |
| 974 | |
| 975 | def create_team( |
| 976 | self, |
| 977 | name: str, |
| 978 | repo_names: Opt[list[Repository]] = NotSet, |
| 979 | permission: Opt[str] = NotSet, |
| 980 | privacy: Opt[str] = NotSet, |
| 981 | description: Opt[str] = NotSet, |
| 982 | parent_team_id: Opt[int] = NotSet, |
| 983 | maintainers: Opt[list[str]] = NotSet, |
| 984 | notification_setting: Opt[str] = NotSet, |
| 985 | ) -> Team: |
| 986 | """ |
| 987 | :calls: `POST /orgs/{org}/teams <https://docs.github.com/en/rest/reference/teams#list-teams>`_ |
| 988 | :param name: string |
| 989 | :param repo_names: list of :class:`github.Repository.Repository` |
| 990 | :param permission: string |
| 991 | :param privacy: string |
| 992 | :param description: string |
| 993 | :param parent_team_id: integer |
| 994 | :param maintainers: list of: integer |
| 995 | :param notification_setting: string |
| 996 | :rtype: :class:`github.Team.Team` |
| 997 | """ |
| 998 | assert isinstance(name, str), name |
| 999 | assert is_optional_list(repo_names, github.Repository.Repository), repo_names |
| 1000 | assert is_optional_list(maintainers, str), maintainers |
| 1001 | assert is_optional(parent_team_id, int), parent_team_id |
| 1002 | assert is_optional(permission, str), permission |
| 1003 | assert is_optional(privacy, str), privacy |
| 1004 | assert is_optional(description, str), description |
| 1005 | assert notification_setting in ["notifications_enabled", "notifications_disabled", NotSet], notification_setting |
| 1006 | post_parameters: dict[str, Any] = NotSet.remove_unset_items( |
| 1007 | { |
| 1008 | "name": name, |
| 1009 | "permission": permission, |
| 1010 | "privacy": privacy, |
| 1011 | "description": description, |
| 1012 | "parent_team_id": parent_team_id, |
| 1013 | "maintainers": maintainers, |
| 1014 | "notification_setting": notification_setting, |
| 1015 | } |
| 1016 | ) |
| 1017 | if is_defined(repo_names): |
| 1018 | post_parameters["repo_names"] = [element._identity for element in repo_names] |
| 1019 | headers, data = self._requester.requestJsonAndCheck("POST", f"{self.url}/teams", input=post_parameters) |
| 1020 | return github.Team.Team(self._requester, headers, data, completed=True) |
| 1021 | |
| 1022 | def create_variable( |
| 1023 | self, |
no test coverage detected