diff --git a/example/newfilewithappauth/main.go b/example/newfilewithappauth/main.go index 3162174d45..0e7c089956 100644 --- a/example/newfilewithappauth/main.go +++ b/example/newfilewithappauth/main.go @@ -29,7 +29,7 @@ func main() { itr, err := ghinstallation.NewAppsTransport(http.DefaultTransport, 10, privatePem) if err != nil { - log.Fatalf("faild to create app transport: %v\n", err) + log.Fatalf("failed to create app transport: %v\n", err) } itr.BaseURL = gitHost @@ -42,7 +42,7 @@ func main() { ).WithEnterpriseURLs(gitHost, gitHost) if err != nil { - log.Fatalf("faild to create git client for app: %v\n", err) + log.Fatalf("failed to create git client for app: %v\n", err) } installations, _, err := client.Apps.ListInstallations(context.Background(), &github.ListOptions{}) diff --git a/github/dependabot_alerts.go b/github/dependabot_alerts.go index f1ed126c21..c274f07bec 100644 --- a/github/dependabot_alerts.go +++ b/github/dependabot_alerts.go @@ -10,7 +10,7 @@ import ( "fmt" ) -// Dependency reprensents the vulnerable dependency. +// Dependency represents the vulnerable dependency. type Dependency struct { Package *VulnerabilityPackage `json:"package,omitempty"` ManifestPath *string `json:"manifest_path,omitempty"` @@ -23,7 +23,7 @@ type AdvisoryCVSS struct { VectorString *string `json:"vector_string,omitempty"` } -// AdvisoryCWEs reprensent the advisory pertaining to Common Weakness Enumeration. +// AdvisoryCWEs represent the advisory pertaining to Common Weakness Enumeration. type AdvisoryCWEs struct { CWEID *string `json:"cwe_id,omitempty"` Name *string `json:"name,omitempty"` diff --git a/github/event_types.go b/github/event_types.go index badd29b2a0..db7c7c69ef 100644 --- a/github/event_types.go +++ b/github/event_types.go @@ -1389,7 +1389,7 @@ type ReleaseEvent struct { // RepositoryEvent is triggered when a repository is created, archived, unarchived, // renamed, edited, transferred, made public, or made private. Organization hooks are -// also trigerred when a repository is deleted. +// also triggered when a repository is deleted. // The Webhook event name is "repository". // // Events of this type are not visible in timelines, they are only used to diff --git a/github/github.go b/github/github.go index 7378d3f203..8bc35e5efe 100644 --- a/github/github.go +++ b/github/github.go @@ -901,7 +901,7 @@ func (c *Client) BareDo(ctx context.Context, req *http.Request) (*Response, erro // JSON decoded and stored in the value pointed to by v, or returned as an // error if an API error has occurred. If v implements the io.Writer interface, // the raw response body will be written to v, without attempting to first -// decode it. If v is nil, and no error hapens, the response is returned as is. +// decode it. If v is nil, and no error happens, the response is returned as is. // If rate limit is exceeded and reset time is in the future, Do returns // *RateLimitError immediately without making a network API call. // diff --git a/github/strings_test.go b/github/strings_test.go index 10074f08bd..fc0f6bafcf 100644 --- a/github/strings_test.go +++ b/github/strings_test.go @@ -80,7 +80,7 @@ func TestStringify(t *testing.T) { } // Directly test the String() methods on various GitHub types. We don't do an -// exaustive test of all the various field types, since TestStringify() above +// exhaustive test of all the various field types, since TestStringify() above // takes care of that. Rather, we just make sure that Stringify() is being // used to build the strings, which we do by verifying that pointers are // stringified as their underlying value. diff --git a/github/teams_test.go b/github/teams_test.go index d215605c61..c0ca1f6dd7 100644 --- a/github/teams_test.go +++ b/github/teams_test.go @@ -872,7 +872,7 @@ func TestTeamsService_AddTeamRepoByID_noAccess(t *testing.T) { ctx := context.Background() _, err := client.Teams.AddTeamRepoByID(ctx, 1, 1, "owner", "repo", nil) if err == nil { - t.Errorf("Expcted error to be returned") + t.Errorf("Expected error to be returned") } } @@ -888,7 +888,7 @@ func TestTeamsService_AddTeamRepoBySlug_noAccess(t *testing.T) { ctx := context.Background() _, err := client.Teams.AddTeamRepoBySlug(ctx, "org", "slug", "owner", "repo", nil) if err == nil { - t.Errorf("Expcted error to be returned") + t.Errorf("Expected error to be returned") } } diff --git a/tools/metadata/testdata/update-go/invalid/github/a.go b/tools/metadata/testdata/update-go/invalid/github/a.go index ceef5fb596..3f58dd2b84 100644 --- a/tools/metadata/testdata/update-go/invalid/github/a.go +++ b/tools/metadata/testdata/update-go/invalid/github/a.go @@ -18,6 +18,7 @@ func (*AService) Ambiguous() {} func (*AService) MissingOperation() {} // DuplicateOperations has duplicate operations +// //meta:operation GET /a/{a_id} //meta:operation POST /a/{a_id} //meta:operation GET /a/{a_id} diff --git a/tools/metadata/testdata/update-go/valid/github/a.go b/tools/metadata/testdata/update-go/valid/github/a.go index 7885efd8c7..245e2ba1df 100644 --- a/tools/metadata/testdata/update-go/valid/github/a.go +++ b/tools/metadata/testdata/update-go/valid/github/a.go @@ -3,10 +3,12 @@ package github type AService struct{} // Get gets an A +// //meta:operation GET /a/{non-canonical-id} func (s *AService) Get() {} // Undocumented uses an undocumented operation +// //meta:operation GET /undocumented/{undocumented_id} func (s *AService) Undocumented() {}