Skip to content

batches(gitlab) handle time with numeric timezone in webhook

Warren Gifford requested to merge bo/fix-gitlab-webhook-parsing-date into main

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"
}

CleanShot 2022-07-05 at 22 35 29@2x

CleanShot 2022-07-05 at 22 39 06@2x

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.

Merge request reports

Loading