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

chore: commit save point

parent d6146e9c
No related branches found
No related tags found
No related merge requests found
......@@ -53,7 +53,6 @@ func collectStructureFromFiles(directory string) (error, map[string]*requirement
p.data.File = "." + bs
p.data.Absolute = cleanedPath
p.data.ToDos = findTask(content)
p.data.Yaml = p.node
k := cleanedPath
......
......@@ -3,6 +3,7 @@ package main
import (
"bytes"
"fmt"
"os"
"strings"
"time"
......@@ -174,35 +175,38 @@ func syncTasksWithGitlab(config *Configuration) error {
context := getGitlabContext(config)
searchProject(context)
//client := context.client
//issues, response, err := client.Issues.ListProjectIssues(context.project.ID, &gitlab.ListProjectIssuesOptions{})
//if err != nil {
// printErrorAndExit(0, "Failed to get issues %s", err.Error())
//}
//for _, issue := range issues {
// fmt.Println(issue.Title)
//}
//fmt.Println(response.StatusCode)
for file, pd := range pageData {
fmt.Println(file)
//fmt.Println(pd)
for filename, pd := range pageData {
buf := new(bytes.Buffer)
//pd.Yaml.Encode(buf)
var encoder = yaml.NewEncoder(buf)
err := encoder.Encode(pd.Yaml)
err := encoder.Encode(pd.OriginNode)
if err != nil {
return err
}
encoder.Close()
fmt.Println(filename)
fmt.Println(string(buf.Bytes()))
text := buf.String()
text += pd.OriginText
info, err := os.Stat(filename)
if err != nil {
return err
}
mode := info.Mode()
err = os.WriteFile(filename, []byte(text), mode)
if err != nil {
return err
}
}
return nil
}
//func replaceYaml(filename string, yaml *yaml.YAML) error {
// buf := new(bytes.Buffer)
// var encoder = yaml.NewEncoder(buf)
// err, pageData := collectStructureFromFiles(config.Path)
//}
......@@ -25,7 +25,8 @@ type requirement struct {
Issues []Issue `yaml:"Issues"`
// remember the node structure of yaml
Yaml *yaml.Node
OriginNode *yaml.Node
OriginText string
ID string `yaml:"ID"`
References []string `yaml:"References"`
......
......@@ -14,7 +14,6 @@ import (
type contentRequirement struct {
content string
data requirement
node *yaml.Node
}
func splitYamlParts(content []byte) (error, contentRequirement) {
......@@ -110,7 +109,8 @@ func splitYamlParts(content []byte) (error, contentRequirement) {
req := contentRequirement{}
req.data = data
req.node = &node
req.data.OriginNode = &node
req.data.OriginText = text
var buffer bytes.Buffer
err = t.Execute(&buffer, data)
......
---
ID: ID1-22
Title: null
# Reference to other requirements
References: null
# Display, Functional, Performance, Printing, Report, Testing or Validation
Type: null
Alias: null
Keywords:
- Requirement
- Requirement
# First and last name of the authors as a list
Author:
- null
Author:
- null
# Proposed (The requirement has been requested by an authorized source.),
# In Progress (A business analyst is actively working on crafting the requirement.),
# Drafted (The initial version of the requirement has been written.),
......@@ -28,94 +20,78 @@ Author:
# Deleted (An approved requirement has been removed from the baseline.) or
# Rejected (The requirement was proposed but was never approved and is not planned for implementation in any upcoming release.)
Status: "Proposed"
# Low, Medium, Hi
Complexity: null
# Low, Medium, Hi
Difficulty: null
# Nice to have, Low, Medium, Hi or Blocker
Priority: null
Priority: null
Version: 0.0.1
Milestone: null
# 0 (means that a task has already been completed), 1 (is a very small task), 2, 3, 5 (are rather smaller tasks),
# 8, 13, 20, 40, 100
Estimation: 40
# The time required for this requirement
# Valid time units are “ns”, “us” (or “µs”), “ms”, “s”, “m”, “h”.
Time Spent: 5h
Time Spent: 5h
# who is the source of the demand
Source: null
Created: 2022-05-03
Last Update: null
# the individual items as a list
Items:
- ID: null
Name: null
# what is it, a image, font, legal information, access data, texts, decisions, etc.
Type: null
# does this belong to a group
Group: null
Description: null
Delivery until: null
# when was the project items delivered and by whom?
Provided on: null
Provided by: null
- ID: null
Name: null
# what is it, a image, font, legal information, access data, texts, decisions, etc.
Type: null
# does this belong to a group
Group: null
Description: null
Delivery until: null
# when was the project items delivered and by whom?
Provided on: null
Provided by: null
# https://gdpr-info.eu/art-30-gdpr/
Privacy:
- ID: null
# Purpose of the data processing,
# for example, shipping an order and handing it over to a shipping service provider.
Purposes: null
# More detailed description of the reason and process of data processing.
Description: null
# Who is responsible for data protection
Contact: null
# But working with these categories might end up being a bad idea since doing so might
# mean packing different things into one. This leads to either oversimplifications or
# a lot of specifications within a category. It might be advisable to split some of them
# up or to add additional ones to make them fit your business reality.
# Examples: Employees, Suppliers, Customers, Job applicants, Consultants, Visitors, Prospects, Contractors, Trainees
Affected Groups: null
#
Category:
# Example: 5 years from the payment of the salary
Data Retention Period: null
# On what legal basis is the data collected
# Special legal regulation outside the GDPR
# Consent of the data subject (Art. 6 para. 1 a) DSG-VO) use Consent field
# Collective agreement (e.g. company agreement, collective agreement)
# Establishment, performance or termination of an employment relationship (nationally regulated in the BDSG)
# Contract or initiation of a contract with the data subject (Art. 6 para. 1 b) DSG-VO.)
# Balancing of interests (Art. 6 para. 1 f) DSG-VO): Please name the overriding interests
Legal Basis: null
# “Consent” of the data subject refers to any freely given specific, informed and unambiguous indication of his or
# her wishes in the form of a statement or other unambiguous affirmative act by which the data subject signifies
# his or her agreement to personal data relating to him or her being processed.
Consent: null
# Where applicable, transfers of personal data to a third country or an international organisation, including
# the identification of that third country or international organisation and, in the case of transfers referred
# to in the second subparagraph of Article 49(1), the documentation of suitable safeguards;
Transfers:
# Where possible, a general description of the technical and organisational
# security measures referred to in Article 32(1).
TOM: null
...
- ID: null
# Purpose of the data processing,
# for example, shipping an order and handing it over to a shipping service provider.
Purposes: null
# More detailed description of the reason and process of data processing.
Description: null
# Who is responsible for data protection
Contact: null
# But working with these categories might end up being a bad idea since doing so might
# mean packing different things into one. This leads to either oversimplifications or
# a lot of specifications within a category. It might be advisable to split some of them
# up or to add additional ones to make them fit your business reality.
# Examples: Employees, Suppliers, Customers, Job applicants, Consultants, Visitors, Prospects, Contractors, Trainees
Affected Groups: null
#
Category:
# Example: 5 years from the payment of the salary
Data Retention Period: null
# On what legal basis is the data collected
# Special legal regulation outside the GDPR
# Consent of the data subject (Art. 6 para. 1 a) DSG-VO) use Consent field
# Collective agreement (e.g. company agreement, collective agreement)
# Establishment, performance or termination of an employment relationship (nationally regulated in the BDSG)
# Contract or initiation of a contract with the data subject (Art. 6 para. 1 b) DSG-VO.)
# Balancing of interests (Art. 6 para. 1 f) DSG-VO): Please name the overriding interests
Legal Basis: null
# “Consent” of the data subject refers to any freely given specific, informed and unambiguous indication of his or
# her wishes in the form of a statement or other unambiguous affirmative act by which the data subject signifies
# his or her agreement to personal data relating to him or her being processed.
Consent: null
# Where applicable, transfers of personal data to a third country or an international organisation, including
# the identification of that third country or international organisation and, in the case of transfers referred
# to in the second subparagraph of Article 49(1), the documentation of suitable safeguards;
Transfers:
# Where possible, a general description of the technical and organisational
# security measures referred to in Article 32(1).
TOM: null
### {{ .Title }} - {{ .ID }}
......
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