Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #3048

Merged
merged 1 commit into from Jan 11, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions example/newfilewithappauth/main.go
Expand Up @@ -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

Expand All @@ -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{})
Expand Down
4 changes: 2 additions & 2 deletions github/dependabot_alerts.go
Expand Up @@ -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"`
Expand All @@ -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"`
Expand Down
2 changes: 1 addition & 1 deletion github/event_types.go
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion github/github.go
Expand Up @@ -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.
//
Expand Down
2 changes: 1 addition & 1 deletion github/strings_test.go
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions github/teams_test.go
Expand Up @@ -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")
}
}

Expand All @@ -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")
}
}

Expand Down
1 change: 1 addition & 0 deletions tools/metadata/testdata/update-go/invalid/github/a.go
Expand Up @@ -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}
Expand Down
2 changes: 2 additions & 0 deletions tools/metadata/testdata/update-go/valid/github/a.go
Expand Up @@ -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() {}

Expand Down