@@ -123,11 +123,9 @@ func (s *TeamsService) ListTeams(ctx context.Context, org string, opts *ListOpti
123123
124124// GetTeamByID fetches a team, given a specified organization ID, by ID.
125125//
126- // Deprecated: Use GetTeamBySlug instead.
127- //
128126// GitHub API docs: https://docs.github.com/rest/teams/teams?apiVersion=2022-11-28#get-a-team-by-name
129127//
130- //meta:operation GET /orgs/{org}/teams/{team_slug }
128+ //meta:operation GET /organizations/{organization_id}/team/{team_id }
131129func (s * TeamsService ) GetTeamByID (ctx context.Context , orgID , teamID int64 ) (* Team , * Response , error ) {
132130 u := fmt .Sprintf ("organizations/%v/team/%v" , orgID , teamID )
133131 req , err := s .client .NewRequest (ctx , "GET" , u , nil )
@@ -251,11 +249,9 @@ func copyNewTeamWithoutParent(team *NewTeam) *newTeamNoParent {
251249
252250// EditTeamByID edits a team, given an organization ID, selected by ID.
253251//
254- // Deprecated: Use EditTeamBySlug instead.
255- //
256252// GitHub API docs: https://docs.github.com/rest/teams/teams?apiVersion=2022-11-28#update-a-team
257253//
258- //meta:operation PATCH /orgs/{org}/teams/{team_slug }
254+ //meta:operation PATCH /organizations/{organization_id}/team/{team_id }
259255func (s * TeamsService ) EditTeamByID (ctx context.Context , orgID , teamID int64 , body NewTeam , removeParent bool ) (* Team , * Response , error ) {
260256 u := fmt .Sprintf ("organizations/%v/team/%v" , orgID , teamID )
261257
@@ -311,11 +307,9 @@ func (s *TeamsService) EditTeamBySlug(ctx context.Context, org, slug string, bod
311307
312308// DeleteTeamByID deletes a team referenced by ID.
313309//
314- // Deprecated: Use DeleteTeamBySlug instead.
315- //
316310// GitHub API docs: https://docs.github.com/rest/teams/teams?apiVersion=2022-11-28#delete-a-team
317311//
318- //meta:operation DELETE /orgs/{org}/teams/{team_slug }
312+ //meta:operation DELETE /organizations/{organization_id}/team/{team_id }
319313func (s * TeamsService ) DeleteTeamByID (ctx context.Context , orgID , teamID int64 ) (* Response , error ) {
320314 u := fmt .Sprintf ("organizations/%v/team/%v" , orgID , teamID )
321315 req , err := s .client .NewRequest (ctx , "DELETE" , u , nil )
@@ -343,11 +337,9 @@ func (s *TeamsService) DeleteTeamBySlug(ctx context.Context, org, slug string) (
343337
344338// ListChildTeamsByParentID lists child teams for a parent team given parent ID.
345339//
346- // Deprecated: Use ListChildTeamsByParentSlug instead.
347- //
348340// GitHub API docs: https://docs.github.com/rest/teams/teams?apiVersion=2022-11-28#list-child-teams
349341//
350- //meta:operation GET /orgs/{org}/teams/{team_slug }/teams
342+ //meta:operation GET /organizations/{organization_id}/team/{team_id }/teams
351343func (s * TeamsService ) ListChildTeamsByParentID (ctx context.Context , orgID , teamID int64 , opts * ListOptions ) ([]* Team , * Response , error ) {
352344 u := fmt .Sprintf ("organizations/%v/team/%v/teams" , orgID , teamID )
353345 u , err := addOptions (u , opts )
@@ -397,11 +389,9 @@ func (s *TeamsService) ListChildTeamsByParentSlug(ctx context.Context, org, slug
397389
398390// ListTeamReposByID lists the repositories given a team ID that the specified team has access to.
399391//
400- // Deprecated: Use ListTeamReposBySlug instead.
401- //
402392// GitHub API docs: https://docs.github.com/rest/teams/teams?apiVersion=2022-11-28#list-team-repositories
403393//
404- //meta:operation GET /orgs/{org}/teams/{team_slug }/repos
394+ //meta:operation GET /organizations/{organization_id}/team/{team_id }/repos
405395func (s * TeamsService ) ListTeamReposByID (ctx context.Context , orgID , teamID int64 , opts * ListOptions ) ([]* Repository , * Response , error ) {
406396 u := fmt .Sprintf ("organizations/%v/team/%v/repos" , orgID , teamID )
407397 u , err := addOptions (u , opts )
@@ -457,11 +447,9 @@ func (s *TeamsService) ListTeamReposBySlug(ctx context.Context, org, slug string
457447// repository is managed by team, a Repository is returned which includes the
458448// permissions team has for that repo.
459449//
460- // Deprecated: Use IsTeamRepoBySlug instead.
461- //
462450// GitHub API docs: https://docs.github.com/rest/teams/teams?apiVersion=2022-11-28#check-team-permissions-for-a-repository
463451//
464- //meta:operation GET /orgs/{org}/teams/{team_slug }/repos/{owner}/{repo}
452+ //meta:operation GET /organizations/{organization_id}/team/{team_id }/repos/{owner}/{repo}
465453func (s * TeamsService ) IsTeamRepoByID (ctx context.Context , orgID , teamID int64 , owner , repo string ) (* Repository , * Response , error ) {
466454 u := fmt .Sprintf ("organizations/%v/team/%v/repos/%v/%v" , orgID , teamID , owner , repo )
467455 req , err := s .client .NewRequest (ctx , "GET" , u , nil )
@@ -524,11 +512,9 @@ type TeamAddTeamRepoOptions struct {
524512// The specified repository must be owned by the organization to which the team
525513// belongs, or a direct fork of a repository owned by the organization.
526514//
527- // Deprecated: Use AddTeamRepoBySlug instead.
528- //
529515// GitHub API docs: https://docs.github.com/rest/teams/teams?apiVersion=2022-11-28#add-or-update-team-repository-permissions
530516//
531- //meta:operation PUT /orgs/{org}/teams/{team_slug }/repos/{owner}/{repo}
517+ //meta:operation PUT /organizations/{organization_id}/team/{team_id }/repos/{owner}/{repo}
532518func (s * TeamsService ) AddTeamRepoByID (ctx context.Context , orgID , teamID int64 , owner , repo string , body * TeamAddTeamRepoOptions ) (* Response , error ) {
533519 u := fmt .Sprintf ("organizations/%v/team/%v/repos/%v/%v" , orgID , teamID , owner , repo )
534520 req , err := s .client .NewRequest (ctx , "PUT" , u , body )
@@ -560,11 +546,9 @@ func (s *TeamsService) AddTeamRepoBySlug(ctx context.Context, org, slug, owner,
560546// team given the team ID. Note that this does not delete the repository, it
561547// just removes it from the team.
562548//
563- // Deprecated: Use RemoveTeamRepoBySlug instead.
564- //
565549// GitHub API docs: https://docs.github.com/rest/teams/teams?apiVersion=2022-11-28#remove-a-repository-from-a-team
566550//
567- //meta:operation DELETE /orgs/{org}/teams/{team_slug }/repos/{owner}/{repo}
551+ //meta:operation DELETE /organizations/{organization_id}/team/{team_id }/repos/{owner}/{repo}
568552func (s * TeamsService ) RemoveTeamRepoByID (ctx context.Context , orgID , teamID int64 , owner , repo string ) (* Response , error ) {
569553 u := fmt .Sprintf ("organizations/%v/team/%v/repos/%v/%v" , orgID , teamID , owner , repo )
570554 req , err := s .client .NewRequest (ctx , "DELETE" , u , nil )
@@ -620,11 +604,11 @@ func (s *TeamsService) ListUserTeams(ctx context.Context, opts *ListOptions) ([]
620604
621605// ListTeamProjectsByID lists the organization projects for a team given the team ID.
622606//
623- // Deprecated: Use ListTeamProjectsBySlug instead .
607+ // Deprecated: This endpoint has been deprecated by GitHub .
624608//
625609// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/teams/teams#list-team-projects
626610//
627- //meta:operation GET /orgs/{org}/teams/{team_slug }/projects
611+ //meta:operation GET /organizations/{organization_id}/team/{team_id }/projects
628612func (s * TeamsService ) ListTeamProjectsByID (ctx context.Context , orgID , teamID int64 ) ([]* ProjectV2 , * Response , error ) {
629613 u := fmt .Sprintf ("organizations/%v/team/%v/projects" , orgID , teamID )
630614
@@ -673,11 +657,11 @@ func (s *TeamsService) ListTeamProjectsBySlug(ctx context.Context, org, slug str
673657// ReviewTeamProjectsByID checks whether a team, given its ID, has read, write, or admin
674658// permissions for an organization project.
675659//
676- // Deprecated: Use ReviewTeamProjectsBySlug instead .
660+ // Deprecated: This endpoint has been deprecated by GitHub .
677661//
678662// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/teams/teams#check-team-permissions-for-a-project
679663//
680- //meta:operation GET /orgs/{org}/teams/{team_slug }/projects/{project_id}
664+ //meta:operation GET /organizations/{organization_id}/team/{team_id }/projects/{project_id}
681665func (s * TeamsService ) ReviewTeamProjectsByID (ctx context.Context , orgID , teamID , projectID int64 ) (* ProjectV2 , * Response , error ) {
682666 u := fmt .Sprintf ("organizations/%v/team/%v/projects/%v" , orgID , teamID , projectID )
683667 req , err := s .client .NewRequest (ctx , "GET" , u , nil )
@@ -738,11 +722,11 @@ type TeamProjectOptions struct {
738722// To add a project to a team or update the team's permission on a project, the
739723// authenticated user must have admin permissions for the project.
740724//
741- // Deprecated: Use AddTeamProjectBySlug instead .
725+ // Deprecated: This endpoint has been deprecated by GitHub .
742726//
743727// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/teams/teams#add-or-update-team-project-permissions
744728//
745- //meta:operation PUT /orgs/{org}/teams/{team_slug }/projects/{project_id}
729+ //meta:operation PUT /organizations/{organization_id}/team/{team_id }/projects/{project_id}
746730func (s * TeamsService ) AddTeamProjectByID (ctx context.Context , orgID , teamID , projectID int64 , body * TeamProjectOptions ) (* Response , error ) {
747731 u := fmt .Sprintf ("organizations/%v/team/%v/projects/%v" , orgID , teamID , projectID )
748732 req , err := s .client .NewRequest (ctx , "PUT" , u , body )
@@ -783,11 +767,11 @@ func (s *TeamsService) AddTeamProjectBySlug(ctx context.Context, org, slug strin
783767// or project.
784768// Note: This endpoint removes the project from the team, but does not delete it.
785769//
786- // Deprecated: Use RemoveTeamProjectBySlug instead .
770+ // Deprecated: This endpoint has been deprecated by GitHub .
787771//
788772// GitHub API docs: https://docs.github.com/enterprise-server@3.16/rest/teams/teams#remove-a-project-from-a-team
789773//
790- //meta:operation DELETE /orgs/{org}/teams/{team_slug }/projects/{project_id}
774+ //meta:operation DELETE /organizations/{organization_id}/team/{team_id }/projects/{project_id}
791775func (s * TeamsService ) RemoveTeamProjectByID (ctx context.Context , orgID , teamID , projectID int64 ) (* Response , error ) {
792776 u := fmt .Sprintf ("organizations/%v/team/%v/projects/%v" , orgID , teamID , projectID )
793777 req , err := s .client .NewRequest (ctx , "DELETE" , u , nil )
@@ -873,11 +857,9 @@ func (s *TeamsService) ListIDPGroupsInOrganization(ctx context.Context, org stri
873857// ListIDPGroupsForTeamByID lists IDP groups connected to a team on GitHub
874858// given organization and team IDs.
875859//
876- // Deprecated: Use ListIDPGroupsForTeamBySlug instead.
877- //
878860// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/teams/team-sync?apiVersion=2022-11-28#list-idp-groups-for-a-team
879861//
880- //meta:operation GET /orgs/{org}/teams/{team_slug }/team-sync/group-mappings
862+ //meta:operation GET /organizations/{organization_id}/team/{team_id }/team-sync/group-mappings
881863func (s * TeamsService ) ListIDPGroupsForTeamByID (ctx context.Context , orgID , teamID int64 ) (* IDPGroupList , * Response , error ) {
882864 u := fmt .Sprintf ("organizations/%v/team/%v/team-sync/group-mappings" , orgID , teamID )
883865
@@ -921,11 +903,9 @@ func (s *TeamsService) ListIDPGroupsForTeamBySlug(ctx context.Context, org, slug
921903// CreateOrUpdateIDPGroupConnectionsByID creates, updates, or removes a connection
922904// between a team and an IDP group given organization and team IDs.
923905//
924- // Deprecated: Use CreateOrUpdateIDPGroupConnectionsBySlug instead.
925- //
926906// GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/teams/team-sync?apiVersion=2022-11-28#create-or-update-idp-group-connections
927907//
928- //meta:operation PATCH /orgs/{org}/teams/{team_slug }/team-sync/group-mappings
908+ //meta:operation PATCH /organizations/{organization_id}/team/{team_id }/team-sync/group-mappings
929909func (s * TeamsService ) CreateOrUpdateIDPGroupConnectionsByID (ctx context.Context , orgID , teamID int64 , body IDPGroupList ) (* IDPGroupList , * Response , error ) {
930910 u := fmt .Sprintf ("organizations/%v/team/%v/team-sync/group-mappings" , orgID , teamID )
931911
0 commit comments