From d8b8655f2199bbda719d56a38943d69031095e3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Fri, 1 May 2026 10:22:13 +0300 Subject: [PATCH] Grammar fixes --- api/http_client.go | 2 +- git/client.go | 2 +- internal/config/config.go | 4 ++-- pkg/cmd/agent-task/capi/job.go | 2 +- pkg/cmd/issue/pin/pin.go | 2 +- pkg/cmd/issue/unpin/unpin.go | 2 +- pkg/cmd/label/clone.go | 2 +- pkg/cmd/pr/create/create_test.go | 4 ++-- pkg/cmd/workflow/shared/shared_test.go | 2 +- pkg/iostreams/iostreams_progress_indicator_test.go | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/api/http_client.go b/api/http_client.go index be7a6b8a7..206b8ed56 100644 --- a/api/http_client.go +++ b/api/http_client.go @@ -92,7 +92,7 @@ func NewCachedHTTPClient(httpClient *http.Client, ttl time.Duration) *http.Clien return &newClient } -// AddCacheTTLHeader adds an header to the request telling the cache that the request +// AddCacheTTLHeader adds a header to the request telling the cache that the request // should be cached for a specified amount of time. func AddCacheTTLHeader(rt http.RoundTripper, ttl time.Duration) http.RoundTripper { return &funcTripper{roundTrip: func(req *http.Request) (*http.Response, error) { diff --git a/git/client.go b/git/client.go index 7f2487fce..9f6670d62 100644 --- a/git/client.go +++ b/git/client.go @@ -106,7 +106,7 @@ func (c *Client) Command(ctx context.Context, args ...string) (*Command, error) // It is only usable when constructed by another function in the package because the empty pattern, // without allMatching set to true, will result in an error in AuthenticatedCommand. // -// Callers can currently opt-in to an slightly less secure mode for backwards compatibility by using +// Callers can currently opt-in to a slightly less secure mode for backwards compatibility by using // AllMatchingCredentialsPattern. type CredentialPattern struct { allMatching bool // should only be constructable via AllMatchingCredentialsPattern diff --git a/internal/config/config.go b/internal/config/config.go index a694ca654..dadfa284b 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -580,7 +580,7 @@ color_labels: disabled accessible_colors: disabled # Whether an accessible prompter should be used. Supported values: enabled, disabled accessible_prompter: disabled -# Whether to use a animated spinner as a progress indicator. If disabled, a textual progress indicator is used instead. Supported values: enabled, disabled +# Whether to use an animated spinner as a progress indicator. If disabled, a textual progress indicator is used instead. Supported values: enabled, disabled spinner: enabled ` @@ -681,7 +681,7 @@ var Options = []ConfigOption{ }, { Key: spinnerKey, - Description: "whether to use a animated spinner as a progress indicator", + Description: "whether to use an animated spinner as a progress indicator", DefaultValue: "enabled", AllowedValues: []string{"enabled", "disabled"}, CurrentValue: func(c gh.Config, hostname string) string { diff --git a/pkg/cmd/agent-task/capi/job.go b/pkg/cmd/agent-task/capi/job.go index 2e37d4f5e..a09338695 100644 --- a/pkg/cmd/agent-task/capi/job.go +++ b/pkg/cmd/agent-task/capi/job.go @@ -127,7 +127,7 @@ func (c *CAPIClient) CreateJob(ctx context.Context, owner, repo, problemStatemen return &j, nil } -// GetJob retrieves a agent job +// GetJob retrieves an agent job func (c *CAPIClient) GetJob(ctx context.Context, owner, repo, jobID string) (*Job, error) { if owner == "" || repo == "" || jobID == "" { return nil, errors.New("owner, repo, and jobID are required") diff --git a/pkg/cmd/issue/pin/pin.go b/pkg/cmd/issue/pin/pin.go index 290bec507..ab5d87fe9 100644 --- a/pkg/cmd/issue/pin/pin.go +++ b/pkg/cmd/issue/pin/pin.go @@ -33,7 +33,7 @@ func NewCmdPin(f *cmdutil.Factory, runF func(*PinOptions) error) *cobra.Command cmd := &cobra.Command{ Use: "pin { | }", - Short: "Pin a issue", + Short: "Pin an issue", Long: heredoc.Doc(` Pin an issue to a repository. diff --git a/pkg/cmd/issue/unpin/unpin.go b/pkg/cmd/issue/unpin/unpin.go index ca22aa82e..96e801a68 100644 --- a/pkg/cmd/issue/unpin/unpin.go +++ b/pkg/cmd/issue/unpin/unpin.go @@ -34,7 +34,7 @@ func NewCmdUnpin(f *cmdutil.Factory, runF func(*UnpinOptions) error) *cobra.Comm cmd := &cobra.Command{ Use: "unpin { | }", - Short: "Unpin a issue", + Short: "Unpin an issue", Long: heredoc.Doc(` Unpin an issue from a repository. diff --git a/pkg/cmd/label/clone.go b/pkg/cmd/label/clone.go index a02c4764a..b8c4631c6 100644 --- a/pkg/cmd/label/clone.go +++ b/pkg/cmd/label/clone.go @@ -50,7 +50,7 @@ func newCmdClone(f *cmdutil.Factory, runF func(*cloneOptions) error) *cobra.Comm # Clone and overwrite labels from cli/cli repository into the current repository $ gh label clone cli/cli --force - # Clone labels from cli/cli repository into a octocat/cli repository + # Clone labels from cli/cli repository into octocat/cli repository $ gh label clone cli/cli --repo octocat/cli `), Args: cmdutil.ExactArgs(1, "cannot clone labels: source-repository argument required"), diff --git a/pkg/cmd/pr/create/create_test.go b/pkg/cmd/pr/create/create_test.go index 5bad889b6..a622b60c8 100644 --- a/pkg/cmd/pr/create/create_test.go +++ b/pkg/cmd/pr/create/create_test.go @@ -861,7 +861,7 @@ func Test_createRun(t *testing.T) { { "filename": "template1", "body": "this is a bug" }, { "filename": "template2", - "body": "this is a enhancement" } + "body": "this is an enhancement" } ] } } }`)) reg.Register( httpmock.GraphQL(`mutation PullRequestCreate\b`), @@ -1092,7 +1092,7 @@ func Test_createRun(t *testing.T) { { "filename": "template1", "body": "this is a bug" }, { "filename": "template2", - "body": "this is a enhancement" } + "body": "this is an enhancement" } ] } } }`), ) reg.Register( diff --git a/pkg/cmd/workflow/shared/shared_test.go b/pkg/cmd/workflow/shared/shared_test.go index cd53b667c..cc9017d36 100644 --- a/pkg/cmd/workflow/shared/shared_test.go +++ b/pkg/cmd/workflow/shared/shared_test.go @@ -406,7 +406,7 @@ func TestGetWorkflows(t *testing.T) { } } -// generateWorkflows returns an slice of workflows with the given count, labeled +// generateWorkflows returns a slice of workflows with the given count, labeled // with the page number of testing pagination. // The page number is used to generate unique Names and IDs for each workflow. func generateWorkflows(t *testing.T, workflowCount int, pageNum int) []Workflow { diff --git a/pkg/iostreams/iostreams_progress_indicator_test.go b/pkg/iostreams/iostreams_progress_indicator_test.go index 60d0ece91..8e27e60a5 100644 --- a/pkg/iostreams/iostreams_progress_indicator_test.go +++ b/pkg/iostreams/iostreams_progress_indicator_test.go @@ -27,7 +27,7 @@ func TestStartProgressIndicatorWithLabel(t *testing.T) { // waiting for input because the console is not ready to be read. // But in this case, we are not blocking waiting for input and stdout // can be constantly read. This means the timeout will never be reached - // in the event of a expectation failure. + // in the event of an expectation failure. // To fix this, we need to implement our own timeout that is based // specifically on the total time spent reading the console and waiting // for the target string instead of the max time for a single read