Skip to content

Adding label results in: json: cannot unmarshal number into Go struct field label.id of type string #8652

@kwk

Description

@kwk

Describe the bug

This command used to work with gh in version 2.36.0.

$ gh --repo fedora-llvm-team/llvm-snapshots label create arch/x86_64 --color C5DEF5 --force
✓ Label "arch/x86_64" created in fedora-llvm-team/llvm-snapshots

grafik

After updating to version 2.43.0 the same command results in an error:

$ gh --repo fedora-llvm-team/llvm-snapshots label create arch/x86_64 --color C5DEF5 --force
json: cannot unmarshal number into Go struct field label.id of type string

grafik

Steps to reproduce the behavior

  1. Run gh --repo <YOURREPOHERE> label create arch/x86_64 --color C5DEF5 --force
  2. Notice the error: json: cannot unmarshal number into Go struct field label.id of type string

Expected vs actual behavior

I want a label to be created without an error as it was with gh in version 2.36.0.

Logs

I've enabled the debug output and here is the output:

$ GH_DEBUG=1  gh --repo fedora-llvm-team/llvm-snapshots label create "arch/x86_64" --color C5DEF5 --force
⣾* Request at 2024-01-31 18:09:06.3070798 +0100 CET m=+0.036524162
* Request to https://api.github.com/repos/fedora-llvm-team/llvm-snapshots/labels
⣻* Request took 351.745197ms
* Request at 2024-01-31 18:09:06.667054442 +0100 CET m=+0.396498854
⢿* Request to https://api.github.com/repos/fedora-llvm-team/llvm-snapshots/labels/arch/x86_64
⣟* Request took 291.129669ms
json: cannot unmarshal number into Go struct field label.id of type string

Metadata

Metadata

Labels

bugSomething isn't workingp1Affects a large population and inhibits work

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions