Commit 82f2ebac authored by nyxi's avatar nyxi Committed by Sander van Harmelen

Fix type for commit.duration in BuildEvent (#361)

* Fix the PipelineEvent struct, with proper sub struct for Runner and correct type for the artifacts_file 'size' field

* Updated tests for changes to PipelineEvent

* Formatting

* Naming

* BuildEvent BuildDuration is a float, not a string

* float64

* Duration is an integer, not a string
parent 365be62c
...@@ -641,7 +641,7 @@ type BuildEvent struct { ...@@ -641,7 +641,7 @@ type BuildEvent struct {
AuthorName string `json:"author_name"` AuthorName string `json:"author_name"`
AuthorEmail string `json:"author_email"` AuthorEmail string `json:"author_email"`
Status string `json:"status"` Status string `json:"status"`
Duration string `json:"duration"` Duration int `json:"duration"`
StartedAt string `json:"started_at"` StartedAt string `json:"started_at"`
FinishedAt string `json:"finished_at"` FinishedAt string `json:"finished_at"`
} `json:"commit"` } `json:"commit"`
......
...@@ -440,7 +440,7 @@ func TestBuildEventUnmarshal(t *testing.T) { ...@@ -440,7 +440,7 @@ func TestBuildEventUnmarshal(t *testing.T) {
"author_name": "User", "author_name": "User",
"author_email": "user@gitlab.com", "author_email": "user@gitlab.com",
"status": "created", "status": "created",
"duration": null, "duration": 199,
"started_at": null, "started_at": null,
"finished_at": null "finished_at": null
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment