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 (
"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
}
......
......@@ -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 {
......
......@@ -45,6 +45,9 @@ Issues:
- Gitlab:
Title: Test 1
Status: offen
Description: Lorem Ipsum
Lila Rot Blau1
Lila Rot Blau2
Labels:
- a
- 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