Project/Group Access Token Webhook Payloads use different date time formats for field created_at
Summary
Looking at the docs for the project and group access token events webhook, the object_attributes.created_at
field differs for PAT and GAT:
- Group token:
"created_at": "2024-01-24 16:27:40 UTC"
- Project token:
"created_at": "2024-02-05T03:13:44.855Z"
The MR where this was introduced shows examples in the description that have the same date time format, while the doc change in the same MR shows different formats. Which one is correct?
Steps to reproduce
I tried to receive some real production example payloads for both types, but setting key expirations to 8 days didn't trigger any event. Not sure if this is another issue or my timing expectation is just wrong. The docs make it sound like the event gets triggered 7 days before token expiration.
Example Project
none (webhooks)
What is the current bug behavior?
Date time formats for created_at
differ in the same webhook event (in the docs)
What is the expected correct behavior?
Same date time formats for consistent payload processing
Relevant logs and/or screenshots
none
Output of checks
See summary for documented outputs, I failed to receive a "real" output, so omitting the "reproduced on…" label
Possible fixes
- Maybe this is just a documentation issue? As I said, couldn't get the event to trigger to test it myself (the payload examples in !141907 (merged) show the same date time format in the MR description, while the doc change in the same MR shows different formats)
- If it's not a docs issue, unify the date time format just for this webhook event if possible
- There is also #19567 which might be the cause for this and as a result unfixable (short-term)?
Whatever it is, it would be great to know which way to go, so GitLab libraries like the Go library can properly handle those events.
Thanks!