Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
Merge pull request #50 from catenax-ng/chore/support_repo
Browse files Browse the repository at this point in the history
chore: metadata enhancement with repo category
  • Loading branch information
FaGru3n authored Sep 21, 2023
2 parents cbdd128 + b08110a commit a1cf186
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .tractusx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

product: "tractusx-quality-checks"
leadingRepository: "https://github.com/eclipse-tractusx/sig-infra"
repoCategory: "support"
repositories:
- name: "Tractus-X quality checks"
usage: "automated release guidelines checks"
Expand All @@ -29,4 +30,4 @@ repositories:
url: "https://github.com/eclipse-tractusx/sig-infra"
- name: "Charts"
usage: "Acts as central Helm Chart repository"
url: "https://github.com/eclipse-tractusx/charts"
url: "https://github.com/eclipse-tractusx/charts"
3 changes: 2 additions & 1 deletion pkg/tractusx/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const MetadataFilename = ".tractusx"
type Metadata struct {
ProductName string `yaml:"product"`
LeadingRepository string `yaml:"leadingRepository"`
RepoCategory string `yaml:"repoCategory"`
Repositories []Repository `yaml:"repositories"`
}

Expand Down Expand Up @@ -62,7 +63,7 @@ func MetadataFromLocalFile(dir string) (*Metadata, error) {
metadataFileAsBytes, err := os.ReadFile(path.Join(dir, MetadataFilename))

if err != nil {
fmt.Println(fmt.Sprintf("Could not read Tractus-X metadatafile from default location: %s", MetadataFilename))
fmt.Printf("Could not read Tractus-X metadatafile from default location: %s\n", MetadataFilename)
return nil, err
}

Expand Down
1 change: 1 addition & 0 deletions pkg/tractusx/metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
var metadataFromTestTemplate = Metadata{
ProductName: "sig-infra",
LeadingRepository: "https://github.com/eclipse-tractusx/sig-infra",
RepoCategory: "special",
Repositories: []Repository{
{
Name: "sig-infra",
Expand Down
1 change: 1 addition & 0 deletions pkg/tractusx/test/metadata_test_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

product: "sig-infra"
leadingRepository: "https://github.com/eclipse-tractusx/sig-infra"
repoCategory: "special"
repositories:
- name: "sig-infra"
usage: "Contains issue templates and workflows"
Expand Down

0 comments on commit a1cf186

Please sign in to comment.