Skip to content

Commit 366fb1b

Browse files
alindemandmitshur
authored andcommitted
Change ParentTeamID field to int (from string). (#748)
Using the code as written in the `NestedTeamsPreview` branch produces an error when talking to the GitHub API: panic: PATCH https://github.com/api/teams/2514825: 422 Invalid request. For 'properties/parent_team_id', "2514824" is not a number or null. [] The documentation at https://developer.github.com/v3/orgs/teams/#create-team states that this parameter is an id type which appears to mean an integer, not a string. Also, id is an integer in the sample responses for Get team endpoint, etc.
1 parent 5c20fe5 commit 366fb1b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

github/github-accessors.go

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/orgs_teams.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ type NewTeam struct {
117117
Description *string `json:"description,omitempty"`
118118
Maintainers []string `json:"maintainers,omitempty"`
119119
RepoNames []string `json:"repo_names,omitempty"`
120-
ParentTeamID *string `json:"parent_team_id,omitempty"`
120+
ParentTeamID *int `json:"parent_team_id,omitempty"`
121121

122122
// Deprecated: Permission is deprecated when creating or editing a team in an org
123123
// using the new GitHub permission model. It no longer identifies the

0 commit comments

Comments
 (0)