Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create team is missing parent_team_id parameter #1839

Open
kenzliang opened this issue Feb 5, 2021 · 3 comments
Open

Create team is missing parent_team_id parameter #1839

kenzliang opened this issue Feb 5, 2021 · 3 comments

Comments

@kenzliang
Copy link

kenzliang commented Feb 5, 2021

def create_team(
self,
name,
repo_names=github.GithubObject.NotSet,
permission=github.GithubObject.NotSet,
privacy=github.GithubObject.NotSet,
description=github.GithubObject.NotSet,
):
"""
:calls: `POST /orgs/:org/teams <http://developer.github.com/v3/orgs/teams>`_
:param name: string
:param repo_names: list of :class:`github.Repository.Repository`
:param permission: string
:param privacy: string
:param description: string
:rtype: :class:`github.Team.Team`
"""
assert isinstance(name, str), name
assert repo_names is github.GithubObject.NotSet or all(
isinstance(element, github.Repository.Repository) for element in repo_names
), repo_names
assert permission is github.GithubObject.NotSet or isinstance(
permission, str
), permission
assert privacy is github.GithubObject.NotSet or isinstance(
privacy, str
), privacy
assert description is github.GithubObject.NotSet or isinstance(
description, str
), description
post_parameters = {
"name": name,
}
if repo_names is not github.GithubObject.NotSet:
post_parameters["repo_names"] = [
element._identity for element in repo_names
]
if permission is not github.GithubObject.NotSet:
post_parameters["permission"] = permission
if privacy is not github.GithubObject.NotSet:
post_parameters["privacy"] = privacy
if description is not github.GithubObject.NotSet:
post_parameters["description"] = description
headers, data = self._requester.requestJsonAndCheck(
"POST", self.url + "/teams", input=post_parameters
)
return github.Team.Team(self._requester, headers, data, completed=True)

https://docs.github.com/en/rest/reference/teams#create-a-team

It appears that the organization team creation method is missing a new parameter parent_team_id.

#1840

@stale
Copy link

stale bot commented Jan 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 9, 2022
@samschmitt22
Copy link

Would appreciate this as well. Can't meaningfully create teams if we don't have this option.

@stale stale bot removed the stale label Jan 20, 2022
@piranna
Copy link

piranna commented Mar 21, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants