Skip to content

Commit 7f8c2f9

Browse files
Refctors project items specific method names to adhere to standardized naming convention defined in google#3761
1 parent 00873b1 commit 7f8c2f9

2 files changed

Lines changed: 61 additions & 61 deletions

File tree

‎github/projects.go‎

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -313,12 +313,12 @@ type UpdateProjectItemOptions struct {
313313
Fields []*ProjectV2Field `json:"fields,omitempty"`
314314
}
315315

316-
// ListProjectItemsForOrg lists items for an organization owned project.
316+
// ListOrganizationProjectItems lists items for an organization owned project.
317317
//
318318
// GitHub API docs: https://docs.github.com/rest/projects/items#list-items-for-an-organization-owned-project
319319
//
320320
//meta:operation GET /orgs/{org}/projectsV2/{project_number}/items
321-
func (s *ProjectsService) ListProjectItemsForOrg(ctx context.Context, org string, projectNumber int, opts *ListProjectItemsOptions) ([]*ProjectV2Item, *Response, error) {
321+
func (s *ProjectsService) ListOrganizationProjectItems(ctx context.Context, org string, projectNumber int, opts *ListProjectItemsOptions) ([]*ProjectV2Item, *Response, error) {
322322
u := fmt.Sprintf("orgs/%v/projectsV2/%v/items", org, projectNumber)
323323
u, err := addOptions(u, opts)
324324
if err != nil {
@@ -338,12 +338,12 @@ func (s *ProjectsService) ListProjectItemsForOrg(ctx context.Context, org string
338338
return items, resp, nil
339339
}
340340

341-
// AddProjectItemForOrg adds an issue or pull request item to an organization owned project.
341+
// AddOrganizationProjectItem adds an issue or pull request item to an organization owned project.
342342
//
343343
// GitHub API docs: https://docs.github.com/rest/projects/items#add-item-to-organization-owned-project
344344
//
345345
//meta:operation POST /orgs/{org}/projectsV2/{project_number}/items
346-
func (s *ProjectsService) AddProjectItemForOrg(ctx context.Context, org string, projectNumber int, opts *AddProjectItemOptions) (*ProjectV2Item, *Response, error) {
346+
func (s *ProjectsService) AddOrganizationProjectItem(ctx context.Context, org string, projectNumber int, opts *AddProjectItemOptions) (*ProjectV2Item, *Response, error) {
347347
u := fmt.Sprintf("orgs/%v/projectsV2/%v/items", org, projectNumber)
348348
req, err := s.client.NewRequest("POST", u, opts)
349349
if err != nil {
@@ -358,12 +358,12 @@ func (s *ProjectsService) AddProjectItemForOrg(ctx context.Context, org string,
358358
return item, resp, nil
359359
}
360360

361-
// GetProjectItemForOrg gets a single item from an organization owned project.
361+
// GetOrganizationProjectItem gets a single item from an organization owned project.
362362
//
363363
// GitHub API docs: https://docs.github.com/rest/projects/items#get-an-item-for-an-organization-owned-project
364364
//
365365
//meta:operation GET /orgs/{org}/projectsV2/{project_number}/items/{item_id}
366-
func (s *ProjectsService) GetProjectItemForOrg(ctx context.Context, org string, projectNumber int, itemID int64, opts *GetProjectItemOptions) (*ProjectV2Item, *Response, error) {
366+
func (s *ProjectsService) GetOrganizationProjectItem(ctx context.Context, org string, projectNumber int, itemID int64, opts *GetProjectItemOptions) (*ProjectV2Item, *Response, error) {
367367
u := fmt.Sprintf("orgs/%v/projectsV2/%v/items/%v", org, projectNumber, itemID)
368368
req, err := s.client.NewRequest("GET", u, opts)
369369
if err != nil {
@@ -377,12 +377,12 @@ func (s *ProjectsService) GetProjectItemForOrg(ctx context.Context, org string,
377377
return item, resp, nil
378378
}
379379

380-
// UpdateProjectItemForOrg updates an item in an organization owned project.
380+
// UpdateOrganizationProjectItem updates an item in an organization owned project.
381381
//
382382
// GitHub API docs: https://docs.github.com/rest/projects/items#update-project-item-for-organization
383383
//
384384
//meta:operation PATCH /orgs/{org}/projectsV2/{project_number}/items/{item_id}
385-
func (s *ProjectsService) UpdateProjectItemForOrg(ctx context.Context, org string, projectNumber int, itemID int64, opts *UpdateProjectItemOptions) (*ProjectV2Item, *Response, error) {
385+
func (s *ProjectsService) UpdateOrganizationProjectItem(ctx context.Context, org string, projectNumber int, itemID int64, opts *UpdateProjectItemOptions) (*ProjectV2Item, *Response, error) {
386386
u := fmt.Sprintf("orgs/%v/projectsV2/%v/items/%v", org, projectNumber, itemID)
387387
req, err := s.client.NewRequest("PATCH", u, opts)
388388
if err != nil {
@@ -396,12 +396,12 @@ func (s *ProjectsService) UpdateProjectItemForOrg(ctx context.Context, org strin
396396
return item, resp, nil
397397
}
398398

399-
// DeleteProjectItemForOrg deletes an item from an organization owned project.
399+
// DeleteOrganizationProjectItem deletes an item from an organization owned project.
400400
//
401401
// GitHub API docs: https://docs.github.com/rest/projects/items#delete-project-item-for-organization
402402
//
403403
//meta:operation DELETE /orgs/{org}/projectsV2/{project_number}/items/{item_id}
404-
func (s *ProjectsService) DeleteProjectItemForOrg(ctx context.Context, org string, projectNumber int, itemID int64) (*Response, error) {
404+
func (s *ProjectsService) DeleteOrganizationProjectItem(ctx context.Context, org string, projectNumber int, itemID int64) (*Response, error) {
405405
u := fmt.Sprintf("orgs/%v/projectsV2/%v/items/%v", org, projectNumber, itemID)
406406
req, err := s.client.NewRequest("DELETE", u, nil)
407407
if err != nil {
@@ -410,12 +410,12 @@ func (s *ProjectsService) DeleteProjectItemForOrg(ctx context.Context, org strin
410410
return s.client.Do(ctx, req, nil)
411411
}
412412

413-
// ListProjectItemsForUser lists items for a user owned project.
413+
// ListUserProjectItems lists items for a user owned project.
414414
//
415415
// GitHub API docs: https://docs.github.com/rest/projects/items#list-items-for-a-user-owned-project
416416
//
417417
//meta:operation GET /users/{username}/projectsV2/{project_number}/items
418-
func (s *ProjectsService) ListProjectItemsForUser(ctx context.Context, username string, projectNumber int, opts *ListProjectItemsOptions) ([]*ProjectV2Item, *Response, error) {
418+
func (s *ProjectsService) ListUserProjectItems(ctx context.Context, username string, projectNumber int, opts *ListProjectItemsOptions) ([]*ProjectV2Item, *Response, error) {
419419
u := fmt.Sprintf("users/%v/projectsV2/%v/items", username, projectNumber)
420420
u, err := addOptions(u, opts)
421421
if err != nil {
@@ -433,12 +433,12 @@ func (s *ProjectsService) ListProjectItemsForUser(ctx context.Context, username
433433
return items, resp, nil
434434
}
435435

436-
// AddProjectItemForUser adds an issue or pull request item to a user owned project.
436+
// AddUserProjectItem adds an issue or pull request item to a user owned project.
437437
//
438438
// GitHub API docs: https://docs.github.com/rest/projects/items#add-item-to-user-owned-project
439439
//
440440
//meta:operation POST /users/{username}/projectsV2/{project_number}/items
441-
func (s *ProjectsService) AddProjectItemForUser(ctx context.Context, username string, projectNumber int, opts *AddProjectItemOptions) (*ProjectV2Item, *Response, error) {
441+
func (s *ProjectsService) AddUserProjectItem(ctx context.Context, username string, projectNumber int, opts *AddProjectItemOptions) (*ProjectV2Item, *Response, error) {
442442
u := fmt.Sprintf("users/%v/projectsV2/%v/items", username, projectNumber)
443443
req, err := s.client.NewRequest("POST", u, opts)
444444
if err != nil {
@@ -452,12 +452,12 @@ func (s *ProjectsService) AddProjectItemForUser(ctx context.Context, username st
452452
return item, resp, nil
453453
}
454454

455-
// GetProjectItemForUser gets a single item from a user owned project.
455+
// GetUserProjectItem gets a single item from a user owned project.
456456
//
457457
// GitHub API docs: https://docs.github.com/rest/projects/items#get-an-item-for-a-user-owned-project
458458
//
459459
//meta:operation GET /users/{username}/projectsV2/{project_number}/items/{item_id}
460-
func (s *ProjectsService) GetProjectItemForUser(ctx context.Context, username string, projectNumber int, itemID int64, opts *GetProjectItemOptions) (*ProjectV2Item, *Response, error) {
460+
func (s *ProjectsService) GetUserProjectItem(ctx context.Context, username string, projectNumber int, itemID int64, opts *GetProjectItemOptions) (*ProjectV2Item, *Response, error) {
461461
u := fmt.Sprintf("users/%v/projectsV2/%v/items/%v", username, projectNumber, itemID)
462462
req, err := s.client.NewRequest("GET", u, opts)
463463
if err != nil {
@@ -471,12 +471,12 @@ func (s *ProjectsService) GetProjectItemForUser(ctx context.Context, username st
471471
return item, resp, nil
472472
}
473473

474-
// UpdateProjectItemForUser updates an item in a user owned project.
474+
// UpdateUserProjectItem updates an item in a user owned project.
475475
//
476476
// GitHub API docs: https://docs.github.com/rest/projects/items#update-project-item-for-user
477477
//
478478
//meta:operation PATCH /users/{username}/projectsV2/{project_number}/items/{item_id}
479-
func (s *ProjectsService) UpdateProjectItemForUser(ctx context.Context, username string, projectNumber int, itemID int64, opts *UpdateProjectItemOptions) (*ProjectV2Item, *Response, error) {
479+
func (s *ProjectsService) UpdateUserProjectItem(ctx context.Context, username string, projectNumber int, itemID int64, opts *UpdateProjectItemOptions) (*ProjectV2Item, *Response, error) {
480480
u := fmt.Sprintf("users/%v/projectsV2/%v/items/%v", username, projectNumber, itemID)
481481
req, err := s.client.NewRequest("PATCH", u, opts)
482482
if err != nil {
@@ -490,12 +490,12 @@ func (s *ProjectsService) UpdateProjectItemForUser(ctx context.Context, username
490490
return item, resp, nil
491491
}
492492

493-
// DeleteProjectItemForUser deletes an item from a user owned project.
493+
// DeleteUserProjectItem deletes an item from a user owned project.
494494
//
495495
// GitHub API docs: https://docs.github.com/rest/projects/items#delete-project-item-for-user
496496
//
497497
//meta:operation DELETE /users/{username}/projectsV2/{project_number}/items/{item_id}
498-
func (s *ProjectsService) DeleteProjectItemForUser(ctx context.Context, username string, projectNumber int, itemID int64) (*Response, error) {
498+
func (s *ProjectsService) DeleteUserProjectItem(ctx context.Context, username string, projectNumber int, itemID int64) (*Response, error) {
499499
u := fmt.Sprintf("users/%v/projectsV2/%v/items/%v", username, projectNumber, itemID)
500500
req, err := s.client.NewRequest("DELETE", u, nil)
501501
if err != nil {

0 commit comments

Comments
 (0)