diff --git a/internal/featuredetection/feature_detection.go b/internal/featuredetection/feature_detection.go index 98be5a46439..88997708cca 100644 --- a/internal/featuredetection/feature_detection.go +++ b/internal/featuredetection/feature_detection.go @@ -391,7 +391,7 @@ func (d *detector) SearchFeatures() (SearchFeatures, error) { // // Since there's no schema-wise difference between pre-deprecation and // deprecation periods (i.e. `ISSUE_ADVANCED` is available during both), - // we cannot figure out the exact time period. The consensus is to to use + // we cannot figure out the exact time period. The consensus is to use // the advanced search syntax during both periods. var feature SearchFeatures diff --git a/pkg/cmd/api/api_test.go b/pkg/cmd/api/api_test.go index c242e1ad5b9..bc29b1eb73c 100644 --- a/pkg/cmd/api/api_test.go +++ b/pkg/cmd/api/api_test.go @@ -1360,7 +1360,7 @@ func Test_apiRun_cache(t *testing.T) { AuthenticationFunc: func() gh.AuthConfig { cfg := &config.AuthConfig{} // Required because the http client tries to get the active token and otherwise - // this goes down to to go-gh config and panics. Pretty bad solution, it would + // this goes down to go-gh config and panics. Pretty bad solution, it would // be better if this were black box. cfg.SetActiveToken("token", "stub") return cfg diff --git a/pkg/cmd/project/item-edit/item_edit.go b/pkg/cmd/project/item-edit/item_edit.go index 7819c37a98c..1eb84e74e66 100644 --- a/pkg/cmd/project/item-edit/item_edit.go +++ b/pkg/cmd/project/item-edit/item_edit.go @@ -81,14 +81,14 @@ func NewCmdEditItem(f *cmdutil.Factory, runF func(config editItemConfig) error) Long: heredoc.Docf(` Edit a draft issue or a project item. - There are two ways to select the item and field to edit: + The usual way to select the item and field is by name: pass the project + %[1]snumber%[1]s plus %[1]s--owner%[1]s, point at the item with its issue or pull + request %[1]s--url%[1]s, and name the field with %[1]s--field%[1]s. For single-select + fields, %[1]s--value%[1]s is the option name. - - By ID: pass %[1]s--id%[1]s, %[1]s--field-id%[1]s and %[1]s--project-id%[1]s directly. - - By name: pass %[1]snumber%[1]s plus %[1]s--owner%[1]s, point at the item with its - issue or pull request %[1]s--url%[1]s, and name the field with %[1]s--field%[1]s. - For single-select fields, %[1]s--value%[1]s is the option name. - - In either case, the project is always selected by number and %[1]s--owner%[1]s. + For scripts and machine use, you can also pass GraphQL node IDs directly with + %[1]s--id%[1]s, %[1]s--field-id%[1]s and %[1]s--project-id%[1]s (and, for single-select + fields, %[1]s--single-select-option-id%[1]s). Note that %[1]s--url%[1]s is the issue or pull request URL, not a project URL, so its owner may differ from the project's; %[1]s--owner%[1]s selects the project. @@ -98,13 +98,13 @@ func NewCmdEditItem(f *cmdutil.Factory, runF func(config editItemConfig) error) Remove a project item field value with %[1]s--clear%[1]s. `, "`"), Example: heredoc.Doc(` - # Edit an item's text field value by node ID - $ gh project item-edit --id --field-id --project-id --text "new text" - # Set the "Status" field to "In Progress" for an issue on monalisa's project 1 $ gh project item-edit 1 --owner monalisa --url https://github.com/monalisa/myproject/issues/23 --field "Status" --value "In Progress" - # Clear an item's field value + # Edit an item's text field value by node ID (machine / scripted use) + $ gh project item-edit --id --field-id --project-id --text "new text" + + # Clear an item's field value by node ID $ gh project item-edit --id --field-id --project-id --clear `), Args: cobra.MaximumNArgs(1), diff --git a/pkg/cmd/workflow/run/run.go b/pkg/cmd/workflow/run/run.go index 386227bf16b..9042b9249db 100644 --- a/pkg/cmd/workflow/run/run.go +++ b/pkg/cmd/workflow/run/run.go @@ -328,7 +328,7 @@ func runRun(opts *RunOptions) error { // TODO workflowDispatchRunDetailsCleanup // We will have to always set the `return_run_details` field to true, unless - // we opt into the the new REST API version, which will probably return the + // we opt into the new REST API version, which will probably return the // details by default. if features.DispatchRunDetails { requestBody["return_run_details"] = true