Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/formats/github/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func toGithubManifests(s *sbom.SBOM) Manifests {

name := dependencyName(p)
manifest.Resolved[name] = DependencyNode{
Purl: p.PURL,
PackageURL: p.PURL,
Metadata: toDependencyMetadata(p),
Relationship: toDependencyRelationshipType(p),
Scope: toDependencyScope(p),
Expand Down
6 changes: 3 additions & 3 deletions internal/formats/github/encoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ func Test_toGithubModel(t *testing.T) {
},
Resolved: DependencyGraph{
"pkg:generic/[email protected]": DependencyNode{
Purl: "pkg:generic/[email protected]",
PackageURL: "pkg:generic/[email protected]",
Scope: DependencyScopeRuntime,
Relationship: DependencyRelationshipDirect,
},
"pkg:generic/[email protected]": DependencyNode{
Purl: "pkg:generic/[email protected]",
PackageURL: "pkg:generic/[email protected]",
Scope: DependencyScopeRuntime,
Relationship: DependencyRelationshipDirect,
},
Expand All @@ -125,7 +125,7 @@ func Test_toGithubModel(t *testing.T) {
},
Resolved: DependencyGraph{
"pkg:generic/[email protected]": DependencyNode{
Purl: "pkg:generic/[email protected]",
PackageURL: "pkg:generic/[email protected]",
Scope: DependencyScopeRuntime,
Relationship: DependencyRelationshipDirect,
},
Expand Down
8 changes: 4 additions & 4 deletions internal/formats/github/github_dependency_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ type DependencySnapshot struct {
}

type Job struct {
Name string `json:"name,omitempty"` // !omitempty
ID string `json:"id,omitempty"` // !omitempty
HTMLURL string `json:"html_url,omitempty"`
Correlator string `json:"correlator,omitempty"` // !omitempty
ID string `json:"id,omitempty"` // !omitempty
HTMLURL string `json:"html_url,omitempty"`
}

type DetectorMetadata struct {
Expand Down Expand Up @@ -62,7 +62,7 @@ const (
)

type DependencyNode struct {
Purl string `json:"purl,omitempty"`
PackageURL string `json:"package_url,omitempty"`
Metadata Metadata `json:"metadata,omitempty"`
Relationship DependencyRelationship `json:"relationship,omitempty"`
Scope DependencyScope `json:"scope,omitempty"`
Expand Down