snix/ops/gerrit-webhook-to-irccat/go.mod
Florian Klink 723ef9146b fix(ops/gerrit-webhook-to-irccat): fix json parsing
patchset and change numbers are numbers in the JSON, trying to deserialize them into a string fails:

Jul 28 20:34:03 gerrit01 gerrit-webhook-to-irccat[2430441]: time=2025-07-28T20:34:03.675Z level=WARN msg="failed to parse body" error="json: cannot unmarshal number into Go struct field PatchSet.patchSet.number of type string"

Update our library dependency to a version containing the fixed types.

Also add tests for the three messages we care about.

Change-Id: Iac44e6ad01a8590b4cafa4d301c9f45000f335d0
Reviewed-on: https://cl.snix.dev/c/snix/+/30624
Tested-by: besadii
Reviewed-by: Ryan Lahfa <ryan@lahfa.xyz>
Reviewed-by: Jade Lovelace <jade@lix.systems>
Autosubmit: Florian Klink <flokli@flokli.de>
Reviewed-by: Florian Klink <flokli@flokli.de>
2025-07-29 11:47:24 +00:00

24 lines
764 B
Modula-2

module snix.dev/ops/gerrit-webhook-to-irccat
go 1.24.2
require (
github.com/andygrunwald/go-gerrit v1.0.0
github.com/coreos/go-systemd/v22 v22.5.0
github.com/samber/slog-http v1.6.0
golang.org/x/sync v0.13.0
)
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/testify v1.10.0 // indirect
go.opentelemetry.io/otel v1.29.0 // indirect
go.opentelemetry.io/otel/trace v1.29.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
// Use the different data types sent in streams
// https://github.com/andygrunwald/go-gerrit/pull/189
replace github.com/andygrunwald/go-gerrit => github.com/flokli/go-gerrit v0.0.0-20250728210913-fadc61de9b89