Skip to content

Commit afa6199

Browse files
committed
create team as closed by default to avoid error when it's a parent
1 parent 6d64d9a commit afa6199

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

gh_org_mgr/_gh_org.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,12 @@ def create_missing_teams(self, dry: bool = False):
233233
else:
234234
logging.info("Creating team '%s' without parent", team)
235235
if not dry:
236-
self.org.create_team(team)
236+
self.org.create_team(
237+
team,
238+
# Hardcode privacy as "secret" is not possible in
239+
# parent teams, which is the API's default
240+
privacy="closed",
241+
)
237242

238243
else:
239244
logging.debug("Team '%s' already exists", team)

0 commit comments

Comments
 (0)