batches(gitlab) handle time with numeric timezone in webhook
Created by: BolajiOlajide
Closes #37842 (closed)
Test plan
- Manually triggered the webhook URL with a payload containing a timestamp with a numeric timezone
{
"created_at": "2022-07-05 20:52:49 +0200"
}
Context
The time.Parse
method doesn't support numeric timezones with an MST
format string. We currently use a custom unmarshalJSON
method that performs a bunch of checks to make sure we support all time format from Gitlab's API. However, one format that triggers the issue is that of a time string containing a numeric timezone.