-
Notifications
You must be signed in to change notification settings - Fork 963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft: Updated Webhook types #1674
base: main
Are you sure you want to change the base?
Conversation
@svanharmelen What are your thoughts on changing the fields with time data, from string to customTime type? |
Hmm... We already have Yet I do like your idea to try and parse multiple different formats, but that will only help parsing from the It's indeed a shame the GitLab API doesn't use a consistent time format, yet until now we seemed to be able to get away with just Guess I want to think about it a little and have a closer look when back behind a desk again (I'm away for a few days). |
I thought ya'll had an alternative to |
event_webhook_types.go
Outdated
HumanTotalTimeSpent string `json:"human_total_time_spent"` // TODO Check type | ||
HumanTimeEstimate string `json:"human_time_estimate"` // TODO Check type | ||
HumanTimeChange string `json:"human_time_change"` // TODO Check type | ||
Weight string `json:"weight"` // TODO Check type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So did you check/confirm this? Can you share your findings? Same question goes for all places where you removed similar comments.
event_webhook_types.go
Outdated
@@ -672,15 +671,15 @@ type MergeEvent struct { | |||
Repository *Repository `json:"repository"` | |||
Labels []*EventLabel `json:"labels"` | |||
Changes struct { | |||
Description struct { // TODO GitLab doc doesn't mention this field |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question, were you able to confirm this? Can you share where/how?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am keeping that field, even though the doc doesn't mention it, it does send Description change.
OK, I just noticed I commented on a specific commit instead of the whole PR and that the PR is still labelled as I'll check again when the |
@svanharmelen waiting for your response on this. |
For your reference, So we will need more than one formats, including |
Added missing fields in DeploymentEvent.
Since GitLab doesn't send time data in RFC3339 format, currently, it is being unmarshalled as a string, I have added
customTime
as https://github.com/go-playground/webhooks/blob/master/gitlab/payload.go#L12 is doing.For now only updated DeploymentEvent, planning to update other events as well soon.