From b44f194f6995def38570d77edfec711ae3b12719 Mon Sep 17 00:00:00 2001
From: Volker Schukai <volker.schukai@schukai.com>
Date: Wed, 22 Jun 2022 11:35:15 +0200
Subject: [PATCH] chore: commit save point

---
 application/source/gitlab.go                  | 10 +++++-----
 application/source/issues.go                  | 16 ++++++++--------
 development/examples/example1/req1/1/test1.md |  3 +++
 3 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/application/source/gitlab.go b/application/source/gitlab.go
index 3518acc..ea41623 100644
--- a/application/source/gitlab.go
+++ b/application/source/gitlab.go
@@ -4,6 +4,7 @@ import (
 	"errors"
 	"fmt"
 	"net/url"
+
 	"path"
 
 	"gopkg.in/yaml.v3"
@@ -193,8 +194,6 @@ func recursiveRemove(nodes *yaml.Node) error {
 
 	for i := 0; i < len(nodes.Content); i += 2 {
 
-		fmt.Println(nodes.Content[i].Value)
-
 		if nodes.Content[i].Value == "Issues" {
 			found = i
 			break
@@ -265,6 +264,7 @@ func syncIssuesWithGitlab(pageData map[string]*requirement) {
 					printErrorAndExit(2, "Failed to create issue %s", err.Error())
 				}
 				pageData.Issues[k].GitlabRemote = issue
+				pageData.Issues[k].GitlabIntern = new(GitlabInternalIssueStruct)
 				pageData.Issues[k].GitlabIntern.ID = issue.IID
 
 				var change yaml.Node
@@ -299,13 +299,13 @@ func createIssue(issue Issue) (*gitlab.Issue, error) {
 
 	ptr := &createionOptions
 
-	gitlabIssue, respose, err := context.client.Issues.CreateIssue(context.project.ID, ptr)
+	gitlabIssue, response, err := context.client.Issues.CreateIssue(context.project.ID, ptr)
 
-	if respose.StatusCode == 401 {
+	if response.StatusCode == 401 {
 		return gitlabIssue, err
 	}
 
-	if respose.StatusCode > 299 {
+	if response.StatusCode > 299 {
 		return gitlabIssue, err
 	}
 
diff --git a/application/source/issues.go b/application/source/issues.go
index 221b324..0cb9f5b 100644
--- a/application/source/issues.go
+++ b/application/source/issues.go
@@ -11,14 +11,14 @@ import (
 )
 
 type GitlabInternalIssueStruct struct {
-	ID          int      `yaml:"ID"`
-	Title       string   `yaml:"Title"`
-	Description string   `yaml:"Description"`
-	Priority    string   `yaml:"Priority"`
-	Status      string   `yaml:"Status"`
-	Assignee    string   `yaml:"Assignee"`
-	Milestone   string   `yaml:"Milestone"`
-	Labels      []string `yaml:"Labels"`
+	ID          int    `yaml:"ID"`
+	Title       string `yaml:"Title,omitempty"`
+	Description string `yaml:"Description,omitempty"`
+	//Priority    string   `yaml:"Priority,omitempty"`
+	Status string `yaml:"Status,omitempty"`
+	//Assignee    string   `yaml:"Assignee,omitempty"`
+	//Milestone   string   `yaml:"Milestone,omitempty"`
+	Labels []string `yaml:"Labels,omitempty"`
 }
 
 type Issue struct {
diff --git a/development/examples/example1/req1/1/test1.md b/development/examples/example1/req1/1/test1.md
index 0353010..1812bde 100644
--- a/development/examples/example1/req1/1/test1.md
+++ b/development/examples/example1/req1/1/test1.md
@@ -45,6 +45,9 @@ Issues:
     - Gitlab:
         Title: Test 1
         Status: offen
+        Description: Lorem Ipsum 
+                Lila Rot Blau1
+                Lila Rot Blau2
         Labels:
             - a
             - b
-- 
GitLab