Skip to content

feat: Add missing notification_setting to Team #3431

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

Merged
merged 2 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 39 additions & 36 deletions github/copilot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -515,18 +515,19 @@ func TestCopilotService_ListCopilotSeats(t *testing.T) {
SiteAdmin: Ptr(false),
},
AssigningTeam: &Team{
ID: Ptr(int64(1)),
NodeID: Ptr("MDQ6VGVhbTE="),
URL: Ptr("https://api.github.com/teams/1"),
HTMLURL: Ptr("https://github.com/orgs/github/teams/justice-league"),
Name: Ptr("Justice League"),
Slug: Ptr("justice-league"),
Description: Ptr("A great team."),
Privacy: Ptr("closed"),
Permission: Ptr("admin"),
MembersURL: Ptr("https://api.github.com/teams/1/members{/member}"),
RepositoriesURL: Ptr("https://api.github.com/teams/1/repos"),
Parent: nil,
ID: Ptr(int64(1)),
NodeID: Ptr("MDQ6VGVhbTE="),
URL: Ptr("https://api.github.com/teams/1"),
HTMLURL: Ptr("https://github.com/orgs/github/teams/justice-league"),
Name: Ptr("Justice League"),
Slug: Ptr("justice-league"),
Description: Ptr("A great team."),
Privacy: Ptr("closed"),
Permission: Ptr("admin"),
NotificationSetting: Ptr("notifications_enabled"),
MembersURL: Ptr("https://api.github.com/teams/1/members{/member}"),
RepositoriesURL: Ptr("https://api.github.com/teams/1/repos"),
Parent: nil,
},
CreatedAt: &createdAt1,
UpdatedAt: &updatedAt1,
Expand Down Expand Up @@ -765,18 +766,19 @@ func TestCopilotService_ListCopilotEnterpriseSeats(t *testing.T) {
SiteAdmin: Ptr(false),
},
AssigningTeam: &Team{
ID: Ptr(int64(1)),
NodeID: Ptr("MDQ6VGVhbTE="),
URL: Ptr("https://api.github.com/teams/1"),
HTMLURL: Ptr("https://github.com/orgs/github/teams/justice-league"),
Name: Ptr("Justice League"),
Slug: Ptr("justice-league"),
Description: Ptr("A great team."),
Privacy: Ptr("closed"),
Permission: Ptr("admin"),
MembersURL: Ptr("https://api.github.com/teams/1/members{/member}"),
RepositoriesURL: Ptr("https://api.github.com/teams/1/repos"),
Parent: nil,
ID: Ptr(int64(1)),
NodeID: Ptr("MDQ6VGVhbTE="),
URL: Ptr("https://api.github.com/teams/1"),
HTMLURL: Ptr("https://github.com/orgs/github/teams/justice-league"),
Name: Ptr("Justice League"),
Slug: Ptr("justice-league"),
Description: Ptr("A great team."),
Privacy: Ptr("closed"),
NotificationSetting: Ptr("notifications_enabled"),
Permission: Ptr("admin"),
MembersURL: Ptr("https://api.github.com/teams/1/members{/member}"),
RepositoriesURL: Ptr("https://api.github.com/teams/1/repos"),
Parent: nil,
},
CreatedAt: &createdAt1,
UpdatedAt: &updatedAt1,
Expand Down Expand Up @@ -1087,18 +1089,19 @@ func TestCopilotService_GetSeatDetails(t *testing.T) {
SiteAdmin: Ptr(false),
},
AssigningTeam: &Team{
ID: Ptr(int64(1)),
NodeID: Ptr("MDQ6VGVhbTE="),
URL: Ptr("https://api.github.com/teams/1"),
HTMLURL: Ptr("https://github.com/orgs/github/teams/justice-league"),
Name: Ptr("Justice League"),
Slug: Ptr("justice-league"),
Description: Ptr("A great team."),
Privacy: Ptr("closed"),
Permission: Ptr("admin"),
MembersURL: Ptr("https://api.github.com/teams/1/members{/member}"),
RepositoriesURL: Ptr("https://api.github.com/teams/1/repos"),
Parent: nil,
ID: Ptr(int64(1)),
NodeID: Ptr("MDQ6VGVhbTE="),
URL: Ptr("https://api.github.com/teams/1"),
HTMLURL: Ptr("https://github.com/orgs/github/teams/justice-league"),
Name: Ptr("Justice League"),
Slug: Ptr("justice-league"),
Description: Ptr("A great team."),
Privacy: Ptr("closed"),
NotificationSetting: Ptr("notifications_enabled"),
Permission: Ptr("admin"),
MembersURL: Ptr("https://api.github.com/teams/1/members{/member}"),
RepositoriesURL: Ptr("https://api.github.com/teams/1/repos"),
Parent: nil,
},
CreatedAt: &createdAt,
UpdatedAt: &updatedAt,
Expand Down
8 changes: 8 additions & 0 deletions github/github-accessors.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions github/github-accessors_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 19 additions & 18 deletions github/github-stringify_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions github/teams.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ type Team struct {
// Default is "secret".
Privacy *string `json:"privacy,omitempty"`

// NotificationSetting can be one of: "notifications_enabled", "notifications_disabled".
NotificationSetting *string `json:"notification_setting,omitempty"`

MembersCount *int `json:"members_count,omitempty"`
ReposCount *int `json:"repos_count,omitempty"`
Organization *Organization `json:"organization,omitempty"`
Expand Down
Loading