From 80bfae17ddc54d60201ee087a64a694b9a2a229b Mon Sep 17 00:00:00 2001
From: Volker Schukai <volker.schukai@schukai.com>
Date: Tue, 21 Jun 2022 12:38:00 +0200
Subject: [PATCH] chore: commit save point

---
 application/source/gitlab.go                  | 15 +++++++++++----
 development/examples/example1/req1/1/test1.md |  2 ++
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/application/source/gitlab.go b/application/source/gitlab.go
index 9d8ad9c..242f916 100644
--- a/application/source/gitlab.go
+++ b/application/source/gitlab.go
@@ -171,7 +171,7 @@ func syncFilesWithGitlab() error {
 func syncIssuesWithGitlab(pageData map[string]*requirement) {
 
 	for _, pageData := range pageData {
-		for _, info := range pageData.Issues {
+		for k, info := range pageData.Issues {
 			if info.GitlabRemote != nil {
 				continue
 			}
@@ -183,7 +183,8 @@ func syncIssuesWithGitlab(pageData map[string]*requirement) {
 				if err != nil {
 					printErrorAndExit(2, "Failed to create issue %s", err.Error())
 				}
-				info.GitlabRemote = issue
+				pageData.Issues[k].GitlabRemote = issue
+				pageData.Issues[k].GitlabIntern.ID = issue.IID
 			}
 
 		}
@@ -195,9 +196,15 @@ func createIssue(issue Issue) (*gitlab.Issue, error) {
 	searchProject(context)
 
 	//title := *string(issue.GitlabIntern.Title)
+	labels := gitlab.Labels{}
+	for _, label := range issue.GitlabIntern.Labels {
+		labels = append(labels, label)
+	}
 
 	createionOptions := gitlab.CreateIssueOptions{
-		Title: gitlab.String(issue.GitlabIntern.Title),
+		Title:       gitlab.String(issue.GitlabIntern.Title),
+		Description: gitlab.String(issue.GitlabIntern.Description),
+		Labels:      &labels,
 	}
 
 	ptr := &createionOptions
@@ -212,7 +219,7 @@ func createIssue(issue Issue) (*gitlab.Issue, error) {
 		return gitlabIssue, err
 	}
 
-	return gitlabIssue, err
+	return gitlabIssue, nil
 }
 
 //
diff --git a/development/examples/example1/req1/1/test1.md b/development/examples/example1/req1/1/test1.md
index 14a2048..b998e62 100644
--- a/development/examples/example1/req1/1/test1.md
+++ b/development/examples/example1/req1/1/test1.md
@@ -109,6 +109,8 @@ Privacy:
 
 
 
+
+
 ### {{ .Title }} - {{ .ID }}
 
 #### Subheading
-- 
GitLab