Skip to content
Snippets Groups Projects
Verified Commit b44f194f authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

chore: commit save point

parent 9575ffb6
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,7 @@ import ( ...@@ -4,6 +4,7 @@ import (
"errors" "errors"
"fmt" "fmt"
"net/url" "net/url"
"path" "path"
"gopkg.in/yaml.v3" "gopkg.in/yaml.v3"
...@@ -193,8 +194,6 @@ func recursiveRemove(nodes *yaml.Node) error { ...@@ -193,8 +194,6 @@ func recursiveRemove(nodes *yaml.Node) error {
for i := 0; i < len(nodes.Content); i += 2 { for i := 0; i < len(nodes.Content); i += 2 {
fmt.Println(nodes.Content[i].Value)
if nodes.Content[i].Value == "Issues" { if nodes.Content[i].Value == "Issues" {
found = i found = i
break break
...@@ -265,6 +264,7 @@ func syncIssuesWithGitlab(pageData map[string]*requirement) { ...@@ -265,6 +264,7 @@ func syncIssuesWithGitlab(pageData map[string]*requirement) {
printErrorAndExit(2, "Failed to create issue %s", err.Error()) printErrorAndExit(2, "Failed to create issue %s", err.Error())
} }
pageData.Issues[k].GitlabRemote = issue pageData.Issues[k].GitlabRemote = issue
pageData.Issues[k].GitlabIntern = new(GitlabInternalIssueStruct)
pageData.Issues[k].GitlabIntern.ID = issue.IID pageData.Issues[k].GitlabIntern.ID = issue.IID
var change yaml.Node var change yaml.Node
...@@ -299,13 +299,13 @@ func createIssue(issue Issue) (*gitlab.Issue, error) { ...@@ -299,13 +299,13 @@ func createIssue(issue Issue) (*gitlab.Issue, error) {
ptr := &createionOptions 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 return gitlabIssue, err
} }
if respose.StatusCode > 299 { if response.StatusCode > 299 {
return gitlabIssue, err return gitlabIssue, err
} }
......
...@@ -11,14 +11,14 @@ import ( ...@@ -11,14 +11,14 @@ import (
) )
type GitlabInternalIssueStruct struct { type GitlabInternalIssueStruct struct {
ID int `yaml:"ID"` ID int `yaml:"ID"`
Title string `yaml:"Title"` Title string `yaml:"Title,omitempty"`
Description string `yaml:"Description"` Description string `yaml:"Description,omitempty"`
Priority string `yaml:"Priority"` //Priority string `yaml:"Priority,omitempty"`
Status string `yaml:"Status"` Status string `yaml:"Status,omitempty"`
Assignee string `yaml:"Assignee"` //Assignee string `yaml:"Assignee,omitempty"`
Milestone string `yaml:"Milestone"` //Milestone string `yaml:"Milestone,omitempty"`
Labels []string `yaml:"Labels"` Labels []string `yaml:"Labels,omitempty"`
} }
type Issue struct { type Issue struct {
......
...@@ -45,6 +45,9 @@ Issues: ...@@ -45,6 +45,9 @@ Issues:
- Gitlab: - Gitlab:
Title: Test 1 Title: Test 1
Status: offen Status: offen
Description: Lorem Ipsum
Lila Rot Blau1
Lila Rot Blau2
Labels: Labels:
- a - a
- b - b
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment