diff --git a/github/orgs_teams.go b/github/orgs_teams.go index 858c545..ce0e046 100644 --- a/github/orgs_teams.go +++ b/github/orgs_teams.go @@ -10,10 +10,11 @@ import "fmt" // Team represents a team within a GitHub organization. Teams are used to // manage access to an organization's repositories. type Team struct { - ID *int `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - URL *string `json:"url,omitempty"` - Slug *string `json:"slug,omitempty"` + ID *int `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + URL *string `json:"url,omitempty"` + Slug *string `json:"slug,omitempty"` // Permission is deprecated when creating or editing a team in an org // using the new GitHub permission model. It no longer identifies the diff --git a/github/orgs_teams_test.go b/github/orgs_teams_test.go index a258137..a921592 100644 --- a/github/orgs_teams_test.go +++ b/github/orgs_teams_test.go @@ -46,7 +46,7 @@ func TestOrganizationsService_GetTeam(t *testing.T) { mux.HandleFunc("/teams/1", func(w http.ResponseWriter, r *http.Request) { testMethod(t, r, "GET") - fmt.Fprint(w, `{"id":1, "name":"n", "url":"u", "slug": "s", "permission":"p"}`) + fmt.Fprint(w, `{"id":1, "name":"n", "description": "d", "url":"u", "slug": "s", "permission":"p"}`) }) team, _, err := client.Organizations.GetTeam(1) @@ -54,7 +54,7 @@ func TestOrganizationsService_GetTeam(t *testing.T) { t.Errorf("Organizations.GetTeam returned error: %v", err) } - want := &Team{ID: Int(1), Name: String("n"), URL: String("u"), Slug: String("s"), Permission: String("p")} + want := &Team{ID: Int(1), Name: String("n"), Description: String("d"), URL: String("u"), Slug: String("s"), Permission: String("p")} if !reflect.DeepEqual(team, want) { t.Errorf("Organizations.GetTeam returned %+v, want %+v", team, want) }