Skip to content

Commit 2406067

Browse files
authored
fix: Correct typos in vars, comments, tests (#3289)
1 parent 7fbf488 commit 2406067

15 files changed

+27
-27
lines changed

github/actions_artifacts_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ func TestActionsService_GetArtifact_notFound(t *testing.T) {
267267
}
268268
}
269269

270-
func TestActionsSerivice_DownloadArtifact(t *testing.T) {
270+
func TestActionsService_DownloadArtifact(t *testing.T) {
271271
client, mux, _, teardown := setup()
272272
defer teardown()
273273

github/actions_cache.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ func (s *ActionsService) GetCacheUsageForRepo(ctx context.Context, owner, repo s
173173
// refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated.
174174
//
175175
// Permissions: You must authenticate using an access token with the read:org scope to use this endpoint.
176-
// GitHub Apps must have the organization_admistration:read permission to use this endpoint.
176+
// GitHub Apps must have the organization_administration:read permission to use this endpoint.
177177
//
178178
// GitHub API docs: https://docs.github.com/rest/actions/cache#list-repositories-with-github-actions-cache-usage-for-an-organization
179179
//
@@ -203,7 +203,7 @@ func (s *ActionsService) ListCacheUsageByRepoForOrg(ctx context.Context, org str
203203
// 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated.
204204
//
205205
// Permissions: You must authenticate using an access token with the read:org scope to use this endpoint.
206-
// GitHub Apps must have the organization_admistration:read permission to use this endpoint.
206+
// GitHub Apps must have the organization_administration:read permission to use this endpoint.
207207
//
208208
// GitHub API docs: https://docs.github.com/rest/actions/cache#get-github-actions-cache-usage-for-an-organization
209209
//

github/actions_runners_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ func TestActionsService_RemoveOrganizationRunner(t *testing.T) {
536536
ctx := context.Background()
537537
_, err := client.Actions.RemoveOrganizationRunner(ctx, "o", 21)
538538
if err != nil {
539-
t.Errorf("Actions.RemoveOganizationRunner returned error: %v", err)
539+
t.Errorf("Actions.RemoveOrganizationRunner returned error: %v", err)
540540
}
541541

542542
const methodName = "RemoveOrganizationRunner"

github/apps_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ func TestAppsService_CreateInstallationTokenListReposWithNoOptions(t *testing.T)
544544
})
545545
}
546546

547-
func TestAppsService_CreateAttachement(t *testing.T) {
547+
func TestAppsService_CreateAttachment(t *testing.T) {
548548
client, mux, _, teardown := setup()
549549
defer teardown()
550550

github/github.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ func parseSecondaryRate(r *http.Response) *time.Duration {
774774

775775
// According to GitHub support, endpoints might return x-ratelimit-reset instead,
776776
// as an integer which represents the number of seconds since epoch UTC,
777-
// represting the time to resume making requests.
777+
// representing the time to resume making requests.
778778
if v := r.Header.Get(headerRateReset); v != "" {
779779
secondsSinceEpoch, _ := strconv.ParseInt(v, 10, 64) // Error handling is noop.
780780
retryAfter := time.Until(time.Unix(secondsSinceEpoch, 0))

github/issue_import_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func TestIssueImportService_Create(t *testing.T) {
7474
})
7575
}
7676

77-
func TestIssueImportService_Create_defered(t *testing.T) {
77+
func TestIssueImportService_Create_deferred(t *testing.T) {
7878
client, mux, _, teardown := setup()
7979
defer teardown()
8080

github/migrations_source_import.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ type Import struct {
7676
// Contact GitHub support for more information.
7777
// detection_needs_auth - the importer requires authentication for
7878
// the originating repository to continue detection. Make an
79-
// UpdatImport request, and include VCSUsername and
79+
// UpdateImport request, and include VCSUsername and
8080
// VCSPassword.
8181
// detection_found_nothing - the importer didn't recognize any
8282
// source control at the URL.

github/orgs_members.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ func (s *OrganizationsService) ListOrgInvitationTeams(ctx context.Context, org,
395395
return orgInvitationTeams, resp, nil
396396
}
397397

398-
// ListFailedOrgInvitations returns a list of failed inviatations.
398+
// ListFailedOrgInvitations returns a list of failed invitations.
399399
//
400400
// GitHub API docs: https://docs.github.com/rest/orgs/members#list-failed-organization-invitations
401401
//

github/repos.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,7 +1363,7 @@ type BypassPullRequestAllowancesRequest struct {
13631363

13641364
// DismissalRestrictions specifies which users and teams can dismiss pull request reviews.
13651365
type DismissalRestrictions struct {
1366-
// The list of users who can dimiss pull request reviews.
1366+
// The list of users who can dismiss pull request reviews.
13671367
Users []*User `json:"users"`
13681368
// The list of teams which can dismiss pull request reviews.
13691369
Teams []*Team `json:"teams"`
@@ -1372,7 +1372,7 @@ type DismissalRestrictions struct {
13721372
}
13731373

13741374
// DismissalRestrictionsRequest represents the request to create/edit the
1375-
// restriction to allows only specific users, teams or apps to dimiss pull request reviews. It is
1375+
// restriction to allows only specific users, teams or apps to dismiss pull request reviews. It is
13761376
// separate from DismissalRestrictions above because the request structure is
13771377
// different from the response structure.
13781378
// Note: Both Users and Teams must be nil, or both must be non-nil.

github/teams_discussion_comments.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"fmt"
1111
)
1212

13-
// DiscussionComment represents a GitHub dicussion in a team.
13+
// DiscussionComment represents a GitHub discussion in a team.
1414
type DiscussionComment struct {
1515
Author *User `json:"author,omitempty"`
1616
Body *string `json:"body,omitempty"`
@@ -145,8 +145,8 @@ func (s *TeamsService) GetCommentBySlug(ctx context.Context, org, slug string, d
145145
// GitHub API docs: https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment
146146
//
147147
//meta:operation POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments
148-
func (s *TeamsService) CreateCommentByID(ctx context.Context, orgID, teamID int64, discsusionNumber int, comment DiscussionComment) (*DiscussionComment, *Response, error) {
149-
u := fmt.Sprintf("organizations/%v/team/%v/discussions/%v/comments", orgID, teamID, discsusionNumber)
148+
func (s *TeamsService) CreateCommentByID(ctx context.Context, orgID, teamID int64, discussionNumber int, comment DiscussionComment) (*DiscussionComment, *Response, error) {
149+
u := fmt.Sprintf("organizations/%v/team/%v/discussions/%v/comments", orgID, teamID, discussionNumber)
150150
req, err := s.client.NewRequest("POST", u, comment)
151151
if err != nil {
152152
return nil, nil, err

0 commit comments

Comments
 (0)