diff --git a/application/source/gitlab.go b/application/source/gitlab.go index ea41623d574013a13002f85f9e051b849a1519f3..1f6ff048f17b04af3b390df522215d5e61598309 100644 --- a/application/source/gitlab.go +++ b/application/source/gitlab.go @@ -309,6 +309,9 @@ func createIssue(issue Issue) (*gitlab.Issue, error) { return gitlabIssue, err } + printInfo("Created issue %s (%s)", gitlabIssue.Title, gitlabIssue.ID) + printInfo(" %s", gitlabIssue.WebURL) + return gitlabIssue, nil } diff --git a/application/source/message.go b/application/source/message.go index a57a9bd715cf6c86a6342a060355a9e02814806e..60f014a07443f6550e3590644597896a2e4ada80 100644 --- a/application/source/message.go +++ b/application/source/message.go @@ -42,3 +42,16 @@ func printWarning(message string, a ...interface{}) { color.Warn.Block(message) } + +func printInfo(message string, a ...interface{}) { + + message = printer.Sprintf(message, a...) + + if lastBlock == "info" { + color.Info.Println(" " + message) + return + } + lastBlock = "info" + + color.Info.Block(message) +} diff --git a/application/source/util.go b/application/source/util.go index e4de0d202c624302f9b84e661ba25cb60534db68..3e31ee7f5cd637c88e66a0c592c19047cc5a2f28 100644 --- a/application/source/util.go +++ b/application/source/util.go @@ -78,7 +78,10 @@ func splitYamlParts(content []byte) (error, contentRequirement) { } data := requirement{} - node.Decode(&data) + err = node.Decode(&data) + if err != nil { + return err, contentRequirement{} + } tempItem := []Item{} for i, _ := range data.Items { diff --git a/development/examples/example1/req1/1/test1.md b/development/examples/example1/req1/1/test1.md index f76a99462a274aea0679febe00d0fbf78c86159c..a0f6a3bce8e7e774f880d6a4a16ad2b223623f8e 100644 --- a/development/examples/example1/req1/1/test1.md +++ b/development/examples/example1/req1/1/test1.md @@ -45,7 +45,9 @@ Issues: - Gitlab: Title: Test 1 Status: offen - Description: Lorem Ipsum Lila Rot Blau1 Lila Rot Blau2 + Description: | + Lorem Ipsum Lila Rot + Blau1 Lila Rot Blau2 Labels: - a - b @@ -101,11 +103,7 @@ Privacy: # Where possible, a general description of the technical and organisational # security measures referred to in Article 32(1). TOM: null -Issues: - - Gitlab: - ID: 1 - - Gitlab: - ID: 41 + ... ### {{ .Title }} - {{ .ID }}