Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions backend/plugins/gitlab/models/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ type GitlabDeployment struct {
ConnectionId uint64 `json:"connection_id" gorm:"primaryKey"`
GitlabId int `json:"gitlab_id" gorm:"primaryKey"`

CreatedDate time.Time `json:"created_date"`
UpdatedDate time.Time `json:"updated_date"`
Status string `json:"status"` //created, running, success, failed, canceled, or blocked
CreatedDate time.Time `json:"created_date"`
UpdatedDate *time.Time `json:"updated_date"`
Status string `json:"status"` //created, running, success, failed, canceled, or blocked

DeploymentId int `json:"id" gorm:"primaryKey"`
Iid int `json:"iid"`
Expand Down Expand Up @@ -78,13 +78,13 @@ type GitlabDeployment struct {
DeployableUserWebsiteURL string `json:"deployable_user_website_url" gorm:"type:varchar(255)"`
DeployableUserOrganization string `json:"deployable_user_organization" gorm:"type:varchar(255)"`

DeployablePipelineCreatedAt time.Time `json:"deployable_pipeline_created_at"`
DeployablePipelineID int `json:"deployable_pipeline_id"`
DeployablePipelineRef string `json:"deployable_pipeline_ref" gorm:"type:varchar(255)"`
DeployablePipelineSha string `json:"deployable_pipeline_sha" gorm:"type:varchar(255)"`
DeployablePipelineStatus string `json:"deployable_pipeline_status" gorm:"type:varchar(255)"`
DeployablePipelineUpdatedAt time.Time `json:"deployable_pipeline_updated_at"`
DeployablePipelineWebURL string `json:"deployable_pipeline_web_url" gorm:"type:varchar(255)"`
DeployablePipelineCreatedAt *time.Time `json:"deployable_pipeline_created_at"`
DeployablePipelineID int `json:"deployable_pipeline_id"`
DeployablePipelineRef string `json:"deployable_pipeline_ref" gorm:"type:varchar(255)"`
DeployablePipelineSha string `json:"deployable_pipeline_sha" gorm:"type:varchar(255)"`
DeployablePipelineStatus string `json:"deployable_pipeline_status" gorm:"type:varchar(255)"`
DeployablePipelineUpdatedAt *time.Time `json:"deployable_pipeline_updated_at"`
DeployablePipelineWebURL string `json:"deployable_pipeline_web_url" gorm:"type:varchar(255)"`

UserAvatarURL string `json:"user_avatar_url" gorm:"type:varchar(255)"`
UserID int `json:"user_id"`
Expand Down
16 changes: 8 additions & 8 deletions backend/plugins/gitlab/tasks/deployment_extractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func ExtractDeployment(taskCtx plugin.SubTaskContext) errors.Error {

type GitlabDeploymentResp struct {
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
UpdatedAt *time.Time `json:"updated_at"`
Status string `json:"status"`
Deployable GitlabDeploymentDeployable `json:"deployable"`
Environment GitlabDeploymentEnvironment `json:"environment"`
Expand Down Expand Up @@ -179,13 +179,13 @@ type GitlabDeploymentFullUser struct {
}

type GitlabDeploymentPipeline struct {
CreatedAt time.Time `json:"created_at"`
ID int `json:"id"`
Ref string `json:"ref"`
Sha string `json:"sha"`
Status string `json:"status"`
UpdatedAt time.Time `json:"updated_at"`
WebURL string `json:"web_url"`
CreatedAt *time.Time `json:"created_at"`
ID int `json:"id"`
Ref string `json:"ref"`
Sha string `json:"sha"`
Status string `json:"status"`
UpdatedAt *time.Time `json:"updated_at"`
WebURL string `json:"web_url"`
}

type GitlabDeploymentDeployable struct {
Expand Down