Merge pull request #13326 from scop/style/grammar

Grammar fixes
This commit is contained in:
William Martin 2026-05-06 08:53:54 +02:00 committed by GitHub
commit 3c162a78ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 12 additions and 12 deletions

View file

@ -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) {

View file

@ -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

View file

@ -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 {

View file

@ -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")

View file

@ -33,7 +33,7 @@ func NewCmdPin(f *cmdutil.Factory, runF func(*PinOptions) error) *cobra.Command
cmd := &cobra.Command{
Use: "pin {<number> | <url>}",
Short: "Pin a issue",
Short: "Pin an issue",
Long: heredoc.Doc(`
Pin an issue to a repository.

View file

@ -34,7 +34,7 @@ func NewCmdUnpin(f *cmdutil.Factory, runF func(*UnpinOptions) error) *cobra.Comm
cmd := &cobra.Command{
Use: "unpin {<number> | <url>}",
Short: "Unpin a issue",
Short: "Unpin an issue",
Long: heredoc.Doc(`
Unpin an issue from a repository.

View file

@ -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"),

View file

@ -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(

View file

@ -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 {

View file

@ -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