diff --git a/github/actions_artifacts_test.go b/github/actions_artifacts_test.go index 296e7259c08..61790daf415 100644 --- a/github/actions_artifacts_test.go +++ b/github/actions_artifacts_test.go @@ -267,7 +267,7 @@ func TestActionsService_GetArtifact_notFound(t *testing.T) { } } -func TestActionsSerivice_DownloadArtifact(t *testing.T) { +func TestActionsService_DownloadArtifact(t *testing.T) { client, mux, _, teardown := setup() defer teardown() diff --git a/github/actions_cache.go b/github/actions_cache.go index 271d7d82069..852e9860f1c 100644 --- a/github/actions_cache.go +++ b/github/actions_cache.go @@ -173,7 +173,7 @@ func (s *ActionsService) GetCacheUsageForRepo(ctx context.Context, owner, repo s // refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. // // Permissions: You must authenticate using an access token with the read:org scope to use this endpoint. -// GitHub Apps must have the organization_admistration:read permission to use this endpoint. +// GitHub Apps must have the organization_administration:read permission to use this endpoint. // // GitHub API docs: https://docs.github.com/rest/actions/cache#list-repositories-with-github-actions-cache-usage-for-an-organization // @@ -203,7 +203,7 @@ func (s *ActionsService) ListCacheUsageByRepoForOrg(ctx context.Context, org str // 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. // // Permissions: You must authenticate using an access token with the read:org scope to use this endpoint. -// GitHub Apps must have the organization_admistration:read permission to use this endpoint. +// GitHub Apps must have the organization_administration:read permission to use this endpoint. // // GitHub API docs: https://docs.github.com/rest/actions/cache#get-github-actions-cache-usage-for-an-organization // diff --git a/github/actions_runners_test.go b/github/actions_runners_test.go index f425e8af7b0..beaf01b3d13 100644 --- a/github/actions_runners_test.go +++ b/github/actions_runners_test.go @@ -536,7 +536,7 @@ func TestActionsService_RemoveOrganizationRunner(t *testing.T) { ctx := context.Background() _, err := client.Actions.RemoveOrganizationRunner(ctx, "o", 21) if err != nil { - t.Errorf("Actions.RemoveOganizationRunner returned error: %v", err) + t.Errorf("Actions.RemoveOrganizationRunner returned error: %v", err) } const methodName = "RemoveOrganizationRunner" diff --git a/github/apps_test.go b/github/apps_test.go index aafc263dca0..9b2e0a59114 100644 --- a/github/apps_test.go +++ b/github/apps_test.go @@ -544,7 +544,7 @@ func TestAppsService_CreateInstallationTokenListReposWithNoOptions(t *testing.T) }) } -func TestAppsService_CreateAttachement(t *testing.T) { +func TestAppsService_CreateAttachment(t *testing.T) { client, mux, _, teardown := setup() defer teardown() diff --git a/github/github.go b/github/github.go index cceaec03d49..f0a862855e1 100644 --- a/github/github.go +++ b/github/github.go @@ -774,7 +774,7 @@ func parseSecondaryRate(r *http.Response) *time.Duration { // According to GitHub support, endpoints might return x-ratelimit-reset instead, // as an integer which represents the number of seconds since epoch UTC, - // represting the time to resume making requests. + // representing the time to resume making requests. if v := r.Header.Get(headerRateReset); v != "" { secondsSinceEpoch, _ := strconv.ParseInt(v, 10, 64) // Error handling is noop. retryAfter := time.Until(time.Unix(secondsSinceEpoch, 0)) diff --git a/github/issue_import_test.go b/github/issue_import_test.go index 17c7c17ffe4..6801c3c0ddb 100644 --- a/github/issue_import_test.go +++ b/github/issue_import_test.go @@ -74,7 +74,7 @@ func TestIssueImportService_Create(t *testing.T) { }) } -func TestIssueImportService_Create_defered(t *testing.T) { +func TestIssueImportService_Create_deferred(t *testing.T) { client, mux, _, teardown := setup() defer teardown() diff --git a/github/migrations_source_import.go b/github/migrations_source_import.go index 3b161232f6a..f484b77d474 100644 --- a/github/migrations_source_import.go +++ b/github/migrations_source_import.go @@ -76,7 +76,7 @@ type Import struct { // Contact GitHub support for more information. // detection_needs_auth - the importer requires authentication for // the originating repository to continue detection. Make an - // UpdatImport request, and include VCSUsername and + // UpdateImport request, and include VCSUsername and // VCSPassword. // detection_found_nothing - the importer didn't recognize any // source control at the URL. diff --git a/github/orgs_members.go b/github/orgs_members.go index 5bc23657fcd..f776766afba 100644 --- a/github/orgs_members.go +++ b/github/orgs_members.go @@ -395,7 +395,7 @@ func (s *OrganizationsService) ListOrgInvitationTeams(ctx context.Context, org, return orgInvitationTeams, resp, nil } -// ListFailedOrgInvitations returns a list of failed inviatations. +// ListFailedOrgInvitations returns a list of failed invitations. // // GitHub API docs: https://docs.github.com/rest/orgs/members#list-failed-organization-invitations // diff --git a/github/repos.go b/github/repos.go index 59ef2329f07..d928771df31 100644 --- a/github/repos.go +++ b/github/repos.go @@ -1363,7 +1363,7 @@ type BypassPullRequestAllowancesRequest struct { // DismissalRestrictions specifies which users and teams can dismiss pull request reviews. type DismissalRestrictions struct { - // The list of users who can dimiss pull request reviews. + // The list of users who can dismiss pull request reviews. Users []*User `json:"users"` // The list of teams which can dismiss pull request reviews. Teams []*Team `json:"teams"` @@ -1372,7 +1372,7 @@ type DismissalRestrictions struct { } // DismissalRestrictionsRequest represents the request to create/edit the -// restriction to allows only specific users, teams or apps to dimiss pull request reviews. It is +// restriction to allows only specific users, teams or apps to dismiss pull request reviews. It is // separate from DismissalRestrictions above because the request structure is // different from the response structure. // Note: Both Users and Teams must be nil, or both must be non-nil. diff --git a/github/teams_discussion_comments.go b/github/teams_discussion_comments.go index ad3818c13fb..eba6fdf46a4 100644 --- a/github/teams_discussion_comments.go +++ b/github/teams_discussion_comments.go @@ -10,7 +10,7 @@ import ( "fmt" ) -// DiscussionComment represents a GitHub dicussion in a team. +// DiscussionComment represents a GitHub discussion in a team. type DiscussionComment struct { Author *User `json:"author,omitempty"` Body *string `json:"body,omitempty"` @@ -145,8 +145,8 @@ func (s *TeamsService) GetCommentBySlug(ctx context.Context, org, slug string, d // GitHub API docs: https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment // //meta:operation POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments -func (s *TeamsService) CreateCommentByID(ctx context.Context, orgID, teamID int64, discsusionNumber int, comment DiscussionComment) (*DiscussionComment, *Response, error) { - u := fmt.Sprintf("organizations/%v/team/%v/discussions/%v/comments", orgID, teamID, discsusionNumber) +func (s *TeamsService) CreateCommentByID(ctx context.Context, orgID, teamID int64, discussionNumber int, comment DiscussionComment) (*DiscussionComment, *Response, error) { + u := fmt.Sprintf("organizations/%v/team/%v/discussions/%v/comments", orgID, teamID, discussionNumber) req, err := s.client.NewRequest("POST", u, comment) if err != nil { return nil, nil, err diff --git a/github/teams_discussion_comments_test.go b/github/teams_discussion_comments_test.go index eaac112bf23..fda0428c658 100644 --- a/github/teams_discussion_comments_test.go +++ b/github/teams_discussion_comments_test.go @@ -26,8 +26,8 @@ func tdcEndpointByID(orgID, teamID, discussionNumber, commentNumber string) stri } // "Team Discussion Comments" endpoint, when using a team slug. -func tdcEndpointBySlug(org, slug, dicsuccionsNumber, commentNumber string) string { - out := fmt.Sprintf("/orgs/%v/teams/%v/discussions/%v/comments", org, slug, dicsuccionsNumber) +func tdcEndpointBySlug(org, slug, discussionNumber, commentNumber string) string { + out := fmt.Sprintf("/orgs/%v/teams/%v/discussions/%v/comments", org, slug, discussionNumber) if commentNumber != "" { return fmt.Sprintf("%v/%v", out, commentNumber) } diff --git a/github/teams_discussions.go b/github/teams_discussions.go index ee78c032a61..b056525f4e9 100644 --- a/github/teams_discussions.go +++ b/github/teams_discussions.go @@ -10,7 +10,7 @@ import ( "fmt" ) -// TeamDiscussion represents a GitHub dicussion in a team. +// TeamDiscussion represents a GitHub discussion in a team. type TeamDiscussion struct { Author *User `json:"author,omitempty"` Body *string `json:"body,omitempty"` diff --git a/github/teams_test.go b/github/teams_test.go index bb4fa4eac38..bf62c3b25fa 100644 --- a/github/teams_test.go +++ b/github/teams_test.go @@ -1700,7 +1700,7 @@ func TestTeams_Marshal(t *testing.T) { "members_count": 1, "repos_count": 1 }, - "ldap_dn": "l" + "ldap_dn": "l" }` testJSONMarshal(t, u, want) @@ -1740,13 +1740,13 @@ func TestIDPGroup_Marshal(t *testing.T) { u := &IDPGroup{ GroupID: String("abc1"), GroupName: String("test group"), - GroupDescription: String("test group descripation"), + GroupDescription: String("test group description"), } want := `{ "group_id": "abc1", "group_name": "test group", - "group_description":"test group descripation" + "group_description":"test group description" }` testJSONMarshal(t, u, want) @@ -2186,12 +2186,12 @@ func TestIDPGroupList_Marshal(t *testing.T) { { GroupID: String("abc1"), GroupName: String("test group"), - GroupDescription: String("test group descripation"), + GroupDescription: String("test group description"), }, { GroupID: String("abc2"), GroupName: String("test group2"), - GroupDescription: String("test group descripation2"), + GroupDescription: String("test group description2"), }, }, } @@ -2201,12 +2201,12 @@ func TestIDPGroupList_Marshal(t *testing.T) { { "group_id": "abc1", "group_name": "test group", - "group_description": "test group descripation" + "group_description": "test group description" }, { "group_id": "abc2", "group_name": "test group2", - "group_description": "test group descripation2" + "group_description": "test group description2" } ] }` diff --git a/github/users_emails.go b/github/users_emails.go index 8386de250b2..189187a74a3 100644 --- a/github/users_emails.go +++ b/github/users_emails.go @@ -86,11 +86,11 @@ func (s *UsersService) DeleteEmails(ctx context.Context, emails []string) (*Resp func (s *UsersService) SetEmailVisibility(ctx context.Context, visibility string) ([]*UserEmail, *Response, error) { u := "user/email/visibility" - updateVisiblilityReq := &UserEmail{ + updateVisibilityReq := &UserEmail{ Visibility: &visibility, } - req, err := s.client.NewRequest("PATCH", u, updateVisiblilityReq) + req, err := s.client.NewRequest("PATCH", u, updateVisibilityReq) if err != nil { return nil, nil, err } diff --git a/github/users_gpg_keys.go b/github/users_gpg_keys.go index de7caaf1bd0..2f296a1ef62 100644 --- a/github/users_gpg_keys.go +++ b/github/users_gpg_keys.go @@ -97,7 +97,7 @@ func (s *UsersService) GetGPGKey(ctx context.Context, id int64) (*GPGKey, *Respo return key, resp, nil } -// CreateGPGKey creates a GPG key. It requires authenticatation via Basic Auth +// CreateGPGKey creates a GPG key. It requires authentication via Basic Auth // or OAuth with at least write:gpg_key scope. // // GitHub API docs: https://docs.github.com/rest/users/gpg-keys#create-a-gpg-key-for-the-authenticated-user