Commit c2ef793d authored by Alex Kalderimis's avatar Alex Kalderimis

Add new pipeline fields

parent fd4d48b0
...@@ -111,15 +111,11 @@ type MergeRequest struct { ...@@ -111,15 +111,11 @@ type MergeRequest struct {
RenamedFile bool `json:"renamed_file"` RenamedFile bool `json:"renamed_file"`
DeletedFile bool `json:"deleted_file"` DeletedFile bool `json:"deleted_file"`
} `json:"changes"` } `json:"changes"`
TimeStats *TimeStats `json:"time_stats"` TimeStats *TimeStats `json:"time_stats"`
Squash bool `json:"squash"` Squash bool `json:"squash"`
Pipeline struct { Pipeline *PipelineInfo `json:"pipeline"`
ID int `json:"id"` HeadPipeline *Pipeline `json:"head_pipeline"`
Ref string `json:"ref"` DiffRefs struct {
SHA string `json:"sha"`
Status string `json:"status"`
} `json:"pipeline"`
DiffRefs struct {
BaseSha string `json:"base_sha"` BaseSha string `json:"base_sha"`
HeadSha string `json:"head_sha"` HeadSha string `json:"head_sha"`
StartSha string `json:"start_sha"` StartSha string `json:"start_sha"`
......
...@@ -56,14 +56,31 @@ type Pipeline struct { ...@@ -56,14 +56,31 @@ type Pipeline struct {
AvatarURL string `json:"avatar_url"` AvatarURL string `json:"avatar_url"`
WebURL string `json:"web_url"` WebURL string `json:"web_url"`
} }
UpdatedAt *time.Time `json:"updated_at"` UpdatedAt *time.Time `json:"updated_at"`
CreatedAt *time.Time `json:"created_at"` CreatedAt *time.Time `json:"created_at"`
StartedAt *time.Time `json:"started_at"` StartedAt *time.Time `json:"started_at"`
FinishedAt *time.Time `json:"finished_at"` FinishedAt *time.Time `json:"finished_at"`
CommittedAt *time.Time `json:"committed_at"` CommittedAt *time.Time `json:"committed_at"`
Duration int `json:"duration"` Duration int `json:"duration"`
Coverage string `json:"coverage"` Coverage string `json:"coverage"`
WebURL string `json:"web_url"` WebURL string `json:"web_url"`
DetailedStatus *DetailedStatus `json:"detailed_status"`
}
type DetailedStatus struct {
Icon string `json:"icon"` // eg. "status_warning",
Text string `json:"text"` // eg. "passed",
Label string `json:"label"` // eg. "passed with warnings",
Group string `json:"group"` // eg. "success-with-warnings",
Tooltip string `json:"tooltip"` // eg. "passed",
HasDetails bool `json:"has_details"` // eg. true,
DetailsPath string `json:"details_path"` // eg. "/gitlab-org/gitlab-ee/pipelines/77056819",
Illustration *Illustration `json:"illustration"` // eg. : null,
Favicon string `json:"favicon"` // eg. "https://gitlab.com/assets/ci_favicons/favicon_status_success-8451333011eee8ce9f2ab25dc487fe24a8758c694827a582f17f42b0a90446a2.png"
}
type Illustration struct {
Image string `json:"image"`
} }
func (i Pipeline) String() string { func (i Pipeline) String() string {
......
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