chore(typo): fix grammar in comments, API docs and error messages (#38370)

This commit is contained in:
Milwad Khosravi
2026-07-09 01:22:06 +03:30
committed by GitHub
parent 49ef93940a
commit 545ed92354
13 changed files with 19 additions and 19 deletions

View File

@@ -167,7 +167,7 @@ func validateOptions(field *api.IssueFormField, idx int) error {
options, ok := field.Attributes["options"].([]any)
if !ok || len(options) == 0 {
return position.Errorf("'options' is required and should be a array")
return position.Errorf("'options' is required and should be an array")
}
for optIdx, option := range options {
@@ -270,7 +270,7 @@ func validateDropdownDefault(position errorPosition, attributes map[string]any)
options, ok := attributes["options"].([]any)
if !ok {
// should not happen
return position.Errorf("'options' is required and should be a array")
return position.Errorf("'options' is required and should be an array")
}
if defaultValue < 0 || defaultValue >= len(options) {
return position.Errorf("the value of 'default' is out of range")

View File

@@ -268,7 +268,7 @@ body:
attributes:
label: "a"
`,
wantErr: "body[0](dropdown): 'options' is required and should be a array",
wantErr: "body[0](dropdown): 'options' is required and should be an array",
},
{
name: "dropdown invalid options",