fix: handle string-encoded and null durations in webhooks that happen when Sidekiq runs in compress mode with large payloads
GitLab webhook payloads occasionally serialize duration fields as quoted strings (e.g., 17.1 instead of 17.1). This happens when the Sidekiq job limiter is in compress mode and the payload exceeds the compression threshold.
Previously, the client would fail to unmarshal these payloads, causing the entire webhook to be dropped.
This commit:
- Introduces stringOrFloat64 and stringOrInt64 types in types.go.
- Implements custom UnmarshalJSON to handle raw numbers, quoted strings, and JSON null primitives.
- Implements MarshalJSON to ensure outbound data remains numeric.
- Updates existing webhook types to utilize these resilient types.
Closes #2256 (closed)