Repository: cli/cli (go)

Issue:
gh project item-edit command fails with value for --number is floating point
### Describe the bug

I'm trying to issue the gh project item-edit command to set the value of an item field to a floating point value. The command looks like this:

```
gh project item-edit --project-id $projectId --id $itemId --field-id $fieldId --number 69.84 
```

The command fails with this error:
> GraphQL: Number values cannot exceed 8 decimal places (updateProjectV2ItemFieldValue)

which would be helpful if the value I passed had more than 8 decimal places, but it doesn't.

### Affected version

Please run `gh version` and paste the output below.

gh version 2.65.0 (2025-01-06)

### Steps to reproduce the behavior

- Create a project a define a number field in it.
- Add an item to the project
- Figure out the project ID, item ID, and field ID (no small feat).
- Issue the command above.

### Expected vs actual behavior

The update should succeed when the value provided is valid.

### Logs

Paste the activity from your command line. Redact if needed.

<!-- Note: Set `GH_DEBUG=true` for verbose logs or `GH_DEBUG=api` for verbose logs with HTTP traffic details. -->

[mikekistler@macbookpro] ~>export GH_DEBUG=true                                                                        
[mikekistler@macbookpro] ~>gh project item-edit --project-id $projectId --id $itemId --field-id $fieldId --number 69.84
* Request at 2025-01-30 21:57:28.393059 -0600 CST m=+0.122595376
* Request to https://api.github.com/graphql
* Request took 379.058041ms
GraphQL: Number values cannot exceed 8 decimal places (updateProjectV2ItemFieldValue)
[mikekistler@macbookpro] ~>


Pull request description:
[gh project item-edit] Fix number type
Fixes #10342.

```shell
# number (float32)
$ gh project item-edit --project-id $projectId --id $itemId --field-id $fieldId --number 69.84
GraphQL: Number values cannot exceed 8 decimal places (updateProjectV2ItemFieldValue)

# number (float64)
$ bin/gh project item-edit --project-id $projectId --id $itemId --field-id $fieldId --number 69.84
Edited item "Test"
```

Patch:
diff --git a/pkg/cmd/project/item-edit/item_edit.go b/pkg/cmd/project/item-edit/item_edit.go
index 63dcb3b39..657af1f54 100644
--- a/pkg/cmd/project/item-edit/item_edit.go
+++ b/pkg/cmd/project/item-edit/item_edit.go
@@ -23,7 +23,7 @@ type editItemOpts struct {
 	fieldID              string
 	projectID            string
 	text                 string
-	number               float32
+	number               float64
 	date                 string
 	singleSelectOptionID string
 	iterationID          string
@@ -123,7 +123,7 @@ func NewCmdEditItem(f *cmdutil.Factory, runF func(config editItemConfig) error)
 	editItemCmd.Flags().StringVar(&opts.fieldID, "field-id", "", "ID of the field to update")
 	editItemCmd.Flags().StringVar(&opts.projectID, "project-id", "", "ID of the project to which the field belongs to")
 	editItemCmd.Flags().StringVar(&opts.text, "text", "", "Text value for the field")
-	editItemCmd.Flags().Float32Var(&opts.number, "number", 0, "Number value for the field")
+	editItemCmd.Flags().Float64Var(&opts.number, "number", 0, "Number value for the field")
 	editItemCmd.Flags().StringVar(&opts.date, "date", "", "Date value for the field (YYYY-MM-DD)")
 	editItemCmd.Flags().StringVar(&opts.singleSelectOptionID, "single-select-option-id", "", "ID of the single select option value to set on the field")
 	editItemCmd.Flags().StringVar(&opts.iterationID, "iteration-id", "", "ID of the iteration value to set on the field")
diff --git a/pkg/cmd/project/shared/queries/queries.go b/pkg/cmd/project/shared/queries/queries.go
index 5855e906e..3e63465dd 100644
--- a/pkg/cmd/project/shared/queries/queries.go
+++ b/pkg/cmd/project/shared/queries/queries.go
@@ -250,7 +250,7 @@ type FieldValueNodes struct {
 		Field ProjectField
 	} `graphql:"... on ProjectV2ItemFieldLabelValue"`
 	ProjectV2ItemFieldNumberValue struct {
-		Number float32
+		Number float64
 		Field  ProjectField
 	} `graphql:"... on ProjectV2ItemFieldNumberValue"`
 	ProjectV2ItemFieldSingleSelectValue struct {


Test patch:
diff --git a/pkg/cmd/project/item-edit/item_edit_test.go b/pkg/cmd/project/item-edit/item_edit_test.go
index fb9097d19..2f9a16df6 100644
--- a/pkg/cmd/project/item-edit/item_edit_test.go
+++ b/pkg/cmd/project/item-edit/item_edit_test.go
@@ -47,6 +47,14 @@ func TestNewCmdeditItem(t *testing.T) {
 				itemID: "123",
 			},
 		},
+		{
+			name: "number with floating point value",
+			cli:  "--number 123.45 --id 123",
+			wants: editItemOpts{
+				number: 123.45,
+				itemID: "123",
+			},
+		},
 		{
 			name: "field-id",
 			cli:  "--field-id FIELD_ID --id 123",
@@ -255,7 +263,7 @@ func TestRunItemEdit_Number(t *testing.T) {
 	// edit item
 	gock.New("https://api.github.com").
 		Post("/graphql").
-		BodyString(`{"query":"mutation UpdateItemValues.*","variables":{"input":{"projectId":"project_id","itemId":"item_id","fieldId":"field_id","value":{"number":2}}}}`).
+		BodyString(`{"query":"mutation UpdateItemValues.*","variables":{"input":{"projectId":"project_id","itemId":"item_id","fieldId":"field_id","value":{"number":123.45}}}}`).
 		Reply(200).
 		JSON(map[string]interface{}{
 			"data": map[string]interface{}{
@@ -284,7 +292,7 @@ func TestRunItemEdit_Number(t *testing.T) {
 	config := editItemConfig{
 		io: ios,
 		opts: editItemOpts{
-			number:    2,
+			number:    123.45,
 			itemID:    "item_id",
 			projectID: "project_id",
 			fieldID:   "field_id",