Просмотр исходного кода

Added instance url to gitlab integration type

jnfrati 4 лет назад
Родитель
Сommit
f5031c7d2c
2 измененных файлов с 6 добавлено и 3 удалено
  1. 2 0
      api/types/project_integration.go
  2. 4 3
      internal/models/integrations/gitlab.go

+ 2 - 0
api/types/project_integration.go

@@ -168,6 +168,8 @@ type GitlabIntegration struct {
 
 	// The project that this integration belongs to
 	ProjectID uint `json:"project_id"`
+
+	InstanceURL string `json:"instance_url"`
 }
 
 type ListGitlabResponse []*GitlabIntegration

+ 4 - 3
internal/models/integrations/gitlab.go

@@ -28,8 +28,9 @@ type GitlabIntegration struct {
 
 func (gi *GitlabIntegration) ToGitlabIntegrationType() *types.GitlabIntegration {
 	return &types.GitlabIntegration{
-		CreatedAt: gi.CreatedAt,
-		ID:        gi.ID,
-		ProjectID: gi.ProjectID,
+		CreatedAt:   gi.CreatedAt,
+		ID:          gi.ID,
+		ProjectID:   gi.ProjectID,
+		InstanceURL: gi.InstanceURL,
 	}
 }