Skip to content

Commit eb92cca

Browse files
authored
fix: Typos in func parameter, vars, error, and comments (#3442)
1 parent 4510383 commit eb92cca

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

Diff for: example/verifyartifact/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ func getPolicyBuilder() (*verify.PolicyBuilder, error) {
169169
return nil, err
170170
}
171171

172-
// Set up the articaft policy
172+
// Set up the artifact policy
173173
artifactDigestBytes, err := hex.DecodeString(*artifactDigest)
174174
if err != nil {
175175
return nil, err

Diff for: github/github.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,7 @@ func (c *Client) bareDoUntilFound(ctx context.Context, req *http.Request, maxRed
987987
if maxRedirects <= 0 && rerr.StatusCode == http.StatusMovedPermanently {
988988
return nil, response, fmt.Errorf("reached the maximum amount of redirections: %w", err)
989989
}
990-
return nil, response, fmt.Errorf("unexepected redirection response: %w", err)
990+
return nil, response, fmt.Errorf("unexpected redirection response: %w", err)
991991
}
992992
}
993993

Diff for: github/repos_deployments_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -186,14 +186,14 @@ func TestRepositoriesService_ListDeploymentStatuses(t *testing.T) {
186186

187187
opt := &ListOptions{Page: 2}
188188
ctx := context.Background()
189-
statutses, _, err := client.Repositories.ListDeploymentStatuses(ctx, "o", "r", 1, opt)
189+
statuses, _, err := client.Repositories.ListDeploymentStatuses(ctx, "o", "r", 1, opt)
190190
if err != nil {
191191
t.Errorf("Repositories.ListDeploymentStatuses returned error: %v", err)
192192
}
193193

194194
want := []*DeploymentStatus{{ID: Ptr(int64(1))}, {ID: Ptr(int64(2))}}
195-
if !cmp.Equal(statutses, want) {
196-
t.Errorf("Repositories.ListDeploymentStatuses returned %+v, want %+v", statutses, want)
195+
if !cmp.Equal(statuses, want) {
196+
t.Errorf("Repositories.ListDeploymentStatuses returned %+v, want %+v", statuses, want)
197197
}
198198

199199
const methodName = "ListDeploymentStatuses"

Diff for: github/teams_discussion_comments.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ func (s *TeamsService) CreateCommentByID(ctx context.Context, orgID, teamID int6
167167
// GitHub API docs: https://docs.github.com/rest/teams/discussion-comments#create-a-discussion-comment
168168
//
169169
//meta:operation POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments
170-
func (s *TeamsService) CreateCommentBySlug(ctx context.Context, org, slug string, discsusionNumber int, comment DiscussionComment) (*DiscussionComment, *Response, error) {
171-
u := fmt.Sprintf("orgs/%v/teams/%v/discussions/%v/comments", org, slug, discsusionNumber)
170+
func (s *TeamsService) CreateCommentBySlug(ctx context.Context, org, slug string, discussionNumber int, comment DiscussionComment) (*DiscussionComment, *Response, error) {
171+
u := fmt.Sprintf("orgs/%v/teams/%v/discussions/%v/comments", org, slug, discussionNumber)
172172
req, err := s.client.NewRequest("POST", u, comment)
173173
if err != nil {
174174
return nil, nil, err

0 commit comments

Comments
 (0)