Skip to content
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
2 changes: 1 addition & 1 deletion github/actions_artifacts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions github/actions_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
//
Expand Down Expand Up @@ -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
//
Expand Down
2 changes: 1 addition & 1 deletion github/actions_runners_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion github/apps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion github/issue_import_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion github/migrations_source_import.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion github/orgs_members.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
//
Expand Down
4 changes: 2 additions & 2 deletions github/repos.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand All @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions github/teams_discussion_comments.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions github/teams_discussion_comments_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion github/teams_discussions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
14 changes: 7 additions & 7 deletions github/teams_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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"),
},
},
}
Expand All @@ -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"
}
]
}`
Expand Down
4 changes: 2 additions & 2 deletions github/users_emails.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion github/users_gpg_keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down